From 53fc4ca7ee700dcf5161f8fbdee764822d7bf886 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 10:44:21 +0300 Subject: [PATCH 01/34] improve pass pipeline --- cli/asc.js | 3 + tests/compiler/function-types.optimized.wat | 82 --------------------- 2 files changed, 3 insertions(+), 82 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 8a38d2d3ba..e4d2078218 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -795,6 +795,7 @@ exports.main = function main(argv, options, callback) { add("simplify-globals-optimizing"); } else { add("simplify-globals"); + add("vacuum"); } // moved from (2) // it works better after globals optimizations like simplify-globals, inlining-optimizing and etc @@ -825,7 +826,9 @@ exports.main = function main(argv, options, callback) { if (optimizeLevel >= 3) { // this quite expensive so do this only for highest opt level add("simplify-globals"); + add("vacuum"); // replace indirect calls with direct and inline if possible again. + add("inlining-optimizing"); add("directize"); add("dae-optimizing"); add("precompute-propagate"); diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index fa8ff313b2..faa2e23c6d 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -1,92 +1,10 @@ (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 $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))) (memory $0 1) (data (i32.const 1024) "\"\00\00\00\01\00\00\00\01\00\00\00\"\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") - (table $0 5 funcref) - (elem (i32.const 1) $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0) (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) - (start $~start) - (func $function-types/makeAdder~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) (func $~setArgumentsLength (param $0 i32) nop ) - (func $function-types/makeAdder~anonymous|0 (param $0 i64) (param $1 i64) (result i64) - local.get $0 - local.get $1 - i64.add - ) - (func $function-types/makeAdder~anonymous|0 (param $0 f64) (param $1 f64) (result f64) - local.get $0 - local.get $1 - f64.add - ) - (func $~start - i32.const 2 - i32.const 3 - i32.const 1 - call_indirect (type $i32_i32_=>_i32) - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 23 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 4 - i32.const 5 - i32.const 4 - call_indirect (type $i32_i32_=>_i32) - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 35 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 2 - i32.const 1 - call_indirect (type $i32_i32_=>_i32) - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 41 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 2 - i32.const 1 - call_indirect (type $i32_i32_=>_i32) - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 42 - i32.const 1 - call $~lib/builtins/abort - unreachable - end - ) ) From 6776a0bc482d649684daf749919152fae449fd41 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 10:53:38 +0300 Subject: [PATCH 02/34] add post propagate vacuum --- cli/asc.js | 1 + tests/compiler/do.optimized.wat | 1 - tests/compiler/for.optimized.wat | 1 - tests/compiler/issues/1095.optimized.wat | 1 - tests/compiler/managed-cast.optimized.wat | 1 - tests/compiler/rc/local-init.optimized.wat | 1 - tests/compiler/rc/logical-and-mismatch.optimized.wat | 1 - tests/compiler/rc/logical-or-mismatch.optimized.wat | 1 - tests/compiler/rc/optimize.optimized.wat | 1 - tests/compiler/rc/ternary-mismatch.optimized.wat | 1 - tests/compiler/retain-return.optimized.wat | 1 - tests/compiler/std/object-literal-unmanaged.optimized.wat | 1 - tests/compiler/while.optimized.wat | 1 - 13 files changed, 1 insertion(+), 12 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index e4d2078218..20b6c20e18 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -838,6 +838,7 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); + add("vacuum"); } add("optimize-instructions"); add("simplify-globals-optimizing"); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index bc3a3c3f27..b90edfe6eb 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -750,7 +750,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 683bb9be8a..2be8dc74ea 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -747,7 +747,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 1a1c36bb9e..0b7e5fb6a5 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -666,7 +666,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 8fac7c3390..659851c9dc 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -668,7 +668,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 6932e30fa2..2eef615020 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -665,7 +665,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 10d1489327..4bffe8769f 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -665,7 +665,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index cab8fc5668..400e0a5d28 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -665,7 +665,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 9b4eecde16..6d86849e1e 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -755,7 +755,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 3f08ebd824..2c58670d20 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -667,7 +667,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a73612e31e..c2074a0e2b 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -663,7 +663,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/std/object-literal-unmanaged.optimized.wat b/tests/compiler/std/object-literal-unmanaged.optimized.wat index eb137632c3..63c651dfee 100644 --- a/tests/compiler/std/object-literal-unmanaged.optimized.wat +++ b/tests/compiler/std/object-literal-unmanaged.optimized.wat @@ -663,7 +663,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 6937df9eb1..b4b63fe181 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -755,7 +755,6 @@ (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - nop local.get $0 i32.load offset=4 i32.const -2 From 01a401cae0a72892532775c0f56663734c55cd9f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 11:18:00 +0300 Subject: [PATCH 03/34] reorder vacuum --- cli/asc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 20b6c20e18..e556e90e91 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -795,7 +795,7 @@ exports.main = function main(argv, options, callback) { add("simplify-globals-optimizing"); } else { add("simplify-globals"); - add("vacuum"); + add("vacuum"); // differs } // moved from (2) // it works better after globals optimizations like simplify-globals, inlining-optimizing and etc @@ -832,10 +832,10 @@ exports.main = function main(argv, options, callback) { add("directize"); add("dae-optimizing"); add("precompute-propagate"); + add("vacuum"); add("coalesce-locals"); add("merge-locals"); add("simplify-locals-nostructure"); - add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); add("vacuum"); From b6e4073b123e1c90f187cfacf0d19f51f2d98d16 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 12:03:30 +0300 Subject: [PATCH 04/34] revert reordering --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index e556e90e91..76423988b2 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -832,10 +832,10 @@ exports.main = function main(argv, options, callback) { add("directize"); add("dae-optimizing"); add("precompute-propagate"); - add("vacuum"); add("coalesce-locals"); add("merge-locals"); add("simplify-locals-nostructure"); + add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); add("vacuum"); From 90fa6286bac67dcf609e33e38fef9004c5aed8ad Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 12:33:44 +0300 Subject: [PATCH 05/34] try again --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 76423988b2..e556e90e91 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -832,10 +832,10 @@ exports.main = function main(argv, options, callback) { add("directize"); add("dae-optimizing"); add("precompute-propagate"); + add("vacuum"); add("coalesce-locals"); add("merge-locals"); add("simplify-locals-nostructure"); - add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); add("vacuum"); From c254fdfaca637b065ba0eaedee377fcce416ca2f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 16:26:46 +0300 Subject: [PATCH 06/34] more --- cli/asc.js | 3 +- tests/compiler/memcpy.optimized.wat | 216 +++--- .../resolve-elementaccess.optimized.wat | 32 +- .../retain-release-sanity.optimized.wat | 2 +- tests/compiler/std/array.optimized.wat | 385 +++++----- tests/compiler/std/arraybuffer.optimized.wat | 15 +- tests/compiler/std/math.optimized.wat | 75 +- tests/compiler/std/set.optimized.wat | 536 +++++++------ .../std/string-casemapping.optimized.wat | 2 +- tests/compiler/std/string.optimized.wat | 32 +- tests/compiler/std/typedarray.optimized.wat | 714 +++++++++--------- tests/compiler/wasi/trace.optimized.wat | 32 +- 12 files changed, 1003 insertions(+), 1041 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index e556e90e91..f8f3a0b6dc 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -700,11 +700,12 @@ exports.main = function main(argv, options, callback) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { + add("flatten"); // differs add("simplify-locals-nostructure"); // differs add("vacuum"); // differs - add("reorder-locals"); // differs add("flatten"); add("local-cse"); + add("reorder-locals"); // differs } if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index a4082b6c30..244c3aca52 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -188,25 +188,23 @@ i32.const 1 i32.add local.tee $0 - i32.const 1 - i32.add - local.set $3 local.get $1 i32.const 1 i32.add local.tee $1 - i32.const 1 - i32.add - local.set $4 - local.get $0 - local.get $1 i32.load8_u i32.store8 - local.get $3 + local.get $0 + i32.const 1 + i32.add + local.tee $3 i32.const 1 i32.add local.set $0 - local.get $4 + local.get $1 + i32.const 1 + i32.add + local.tee $4 i32.const 1 i32.add local.set $1 @@ -477,155 +475,141 @@ local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 @@ -658,67 +642,61 @@ local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 @@ -751,23 +729,21 @@ local.get $0 i32.const 1 i32.add - local.tee $3 - i32.const 1 - i32.add - local.set $0 + local.tee $0 local.get $1 i32.const 1 i32.add - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $3 - local.get $4 + local.tee $1 i32.load8_u i32.store8 local.get $0 + i32.const 1 + i32.add + local.tee $0 local.get $1 + i32.const 1 + i32.add + local.tee $1 i32.load8_u i32.store8 local.get $0 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b0f79147b4..22e0398dc8 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1397,7 +1397,7 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 local.get $7 i32.const 1 @@ -1414,17 +1414,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + local.get $6 i64.mul local.get $2 i64.const 4294967295 @@ -1467,28 +1464,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $6 i64.mul local.get $5 - local.get $6 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $5 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i64.add local.get $2 - local.get $10 - i64.mul local.get $6 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1510,13 +1510,13 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $5 local.get $3 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $6 + local.get $5 local.get $3 i64.const 4294967295 i64.and @@ -1536,7 +1536,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $6 i64.mul local.get $3 i64.const 4294967295 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 8e22b9cb9e..2ce2898f0c 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -2079,7 +2079,7 @@ local.get $0 local.get $3 i32.store - local.get $0 + local.get $1 local.get $2 local.tee $3 i32.load diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 34431de0da..3019dedfd9 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2411,7 +2411,6 @@ (func $~lib/array/Array#copyWithin (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 @@ -2420,10 +2419,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 @@ -2445,11 +2444,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 @@ -2457,9 +2456,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 @@ -2471,40 +2470,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 @@ -2616,16 +2615,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 @@ -2635,17 +2633,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 @@ -2660,7 +2658,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 @@ -2674,7 +2672,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 @@ -2687,7 +2685,7 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 local.get $1 i32.sub i32.const 2 @@ -2695,11 +2693,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 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3394,7 +3392,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 i32.load offset=12 local.tee $4 @@ -3424,6 +3421,9 @@ i32.const 2 i32.shl local.tee $3 + local.get $6 + i32.add + local.get $3 local.get $0 i32.load offset=4 i32.add @@ -3432,11 +3432,6 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - local.set $7 - local.get $3 - local.get $6 - i32.add - local.get $7 i32.store local.get $2 i32.const 1 @@ -5961,64 +5956,65 @@ i32.const 16 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $7 + local.tee $4 i32.const 0 i32.store - local.get $7 + local.get $4 i32.const 0 i32.store offset=4 - local.get $7 + local.get $4 i32.const 0 i32.store offset=8 - local.get $7 + local.get $4 i32.const 0 i32.store offset=12 local.get $0 - local.tee $1 - local.get $7 + local.set $2 + local.get $0 + local.get $4 i32.load - local.tee $6 + local.tee $3 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $6 + local.set $2 + local.get $3 call $~lib/rt/pure/__release end - local.get $7 - local.get $1 + local.get $4 + local.get $2 i32.store - local.get $7 + local.get $4 local.get $0 i32.store offset=4 - local.get $7 + local.get $4 i32.const 1600 i32.store offset=8 - local.get $7 + local.get $4 i32.const 400 i32.store offset=12 loop $for-loop|0 - local.get $5 + local.get $1 i32.const 400 i32.lt_s if + local.get $1 + local.set $3 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - local.set $2 + local.set $6 i32.const 0 - local.set $4 + local.set $5 i32.const 6064 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $4 - local.get $2 + local.get $5 + local.get $6 i32.lt_s if - local.get $1 - local.tee $0 block $__inlined_func$~lib/string/String#charAt (result i32) i32.const 6064 call $~lib/math/NativeMath.random @@ -6028,7 +6024,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $1 + local.tee $2 i32.const 5088 call $~lib/string/String#get:length i32.ge_u @@ -6037,55 +6033,58 @@ i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $1 + local.tee $1 + local.get $2 i32.const 1 i32.shl i32.const 5088 i32.add i32.load16_u i32.store16 - local.get $3 + local.get $1 call $~lib/rt/pure/__retain end - local.tee $6 - call $~lib/string/String.__concat - local.tee $3 - local.tee $1 + local.set $2 local.get $0 + local.tee $1 + local.get $2 + call $~lib/string/String.__concat + local.tee $7 + local.tee $0 + local.get $1 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $6 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $7 call $~lib/rt/pure/__release - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|00 end end - local.get $7 - local.get $5 - local.get $1 + local.get $4 + local.get $3 + local.get $0 call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|0 end end - local.get $7 + local.get $4 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7500,7 +7499,7 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 local.get $7 i32.const 1 @@ -7517,17 +7516,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + local.get $6 i64.mul local.get $2 i64.const 4294967295 @@ -7570,28 +7566,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $6 i64.mul local.get $5 - local.get $6 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $5 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i64.add local.get $2 - local.get $10 - i64.mul local.get $6 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -7613,13 +7612,13 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $5 local.get $3 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $6 + local.get $5 local.get $3 i64.const 4294967295 i64.and @@ -7639,7 +7638,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $6 i64.mul local.get $3 i64.const 4294967295 @@ -7951,24 +7950,24 @@ local.get $6 i32.lt_s if + local.get $3 + local.tee $2 local.get $0 local.get $5 i32.const 2 i32.shl i32.add i32.load - local.tee $2 - local.get $3 + 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.tee $3 + local.get $3 if local.get $3 call $~lib/rt/pure/__retain @@ -8037,32 +8036,31 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if - local.get $0 + local.get $2 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 local.get $1 - local.get $2 + local.get $0 call $~lib/string/String.__concat - local.tee $5 - local.tee $2 + local.tee $0 + 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 $5 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 ) @@ -8120,24 +8118,24 @@ local.get $5 i32.lt_s if + local.get $3 + local.tee $2 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $2 - local.get $3 + 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.tee $3 + local.get $3 if local.get $1 local.get $1 @@ -8202,28 +8200,27 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if local.get $1 local.get $1 i32.const 8048 call $~lib/string/String.__concat + local.tee $0 local.tee $3 - local.tee $2 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 - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 ) @@ -9084,24 +9081,24 @@ local.get $5 i32.lt_s if + local.get $3 + local.tee $2 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $2 - local.get $3 + 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.tee $3 + local.get $3 if local.get $3 i32.const 6304 @@ -9171,33 +9168,32 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if - local.get $0 + local.get $2 i32.const 6304 call $~lib/array/Array#join - local.tee $2 + local.tee $0 local.get $1 local.get $1 - local.get $2 + local.get $0 call $~lib/string/String.__concat - local.tee $4 - local.tee $2 + local.tee $0 + local.tee $3 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 $4 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 ) @@ -9395,23 +9391,23 @@ i32.lt_s if local.get $3 + local.tee $2 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.tee $3 + local.get $3 if local.get $1 local.get $1 @@ -9480,32 +9476,31 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if local.get $1 local.get $1 - local.get $0 + local.get $2 call $~lib/array/Array#toString - local.tee $3 + local.tee $0 call $~lib/string/String.__concat local.tee $4 - local.tee $2 + local.tee $3 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 - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 ) @@ -9560,24 +9555,24 @@ local.get $5 i32.lt_s if + local.get $3 + local.tee $2 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $2 - local.get $3 + 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.tee $3 + local.get $3 if local.get $3 i32.const 6304 @@ -9647,33 +9642,32 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if - local.get $0 + local.get $2 i32.const 6304 call $~lib/array/Array#join - local.tee $2 + local.tee $0 local.get $1 local.get $1 - local.get $2 + local.get $0 call $~lib/string/String.__concat - local.tee $4 - local.tee $2 + local.tee $0 + local.tee $3 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 $4 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 ) @@ -9735,23 +9729,23 @@ i32.lt_s if local.get $3 + local.tee $2 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.tee $3 + local.get $3 if local.get $1 local.get $1 @@ -9820,32 +9814,31 @@ call $~lib/rt/pure/__release end local.get $2 - local.tee $0 if local.get $1 local.get $1 - local.get $0 + local.get $2 call $~lib/array/Array<~lib/array/Array>#toString - local.tee $3 + local.tee $0 call $~lib/string/String.__concat local.tee $4 - local.tee $2 + local.tee $3 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 - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $2 + local.get $3 local.set $1 end - local.get $0 + local.get $2 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 3b85b4efd2..7836ae645a 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1528,7 +1528,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 @@ -1549,25 +1549,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/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 481f3e626a..76e176f237 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -10689,21 +10689,21 @@ local.get $0 local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.const -1.984126982985795e-04 - local.get $5 + local.get $6 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $5 - local.get $5 + local.get $6 + local.get $6 + local.get $6 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $5 + local.get $6 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -10711,11 +10711,11 @@ f64.add local.set $3 local.get $0 - local.get $5 + local.get $6 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $5 + local.get $6 local.get $3 f64.mul f64.add @@ -10731,9 +10731,9 @@ f64.mul local.tee $1 f64.sub - local.tee $6 + local.tee $5 f64.const 1 - local.get $6 + local.get $5 f64.sub local.get $1 f64.sub @@ -10752,8 +10752,8 @@ local.get $3 local.get $3 f64.mul - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f64.mul f64.const -2.7557314351390663e-07 local.get $3 @@ -10817,7 +10817,7 @@ local.get $1 f64.const 6.077100506506192e-11 f64.mul - local.tee $6 + local.tee $5 f64.sub local.tee $0 i64.reinterpret_f64 @@ -10847,10 +10847,10 @@ local.get $0 f64.sub f64.sub - local.set $6 + local.set $5 local.get $8 local.get $3 - local.get $6 + local.get $5 f64.sub local.tee $0 i64.reinterpret_f64 @@ -10880,9 +10880,9 @@ local.get $0 f64.sub f64.sub - local.set $6 + local.set $5 local.get $3 - local.get $6 + local.get $5 f64.sub local.set $0 end @@ -10892,7 +10892,7 @@ local.get $3 local.get $0 f64.sub - local.get $6 + local.get $5 f64.sub global.set $~lib/math/rempio2_y1 local.get $1 @@ -10909,11 +10909,11 @@ select end local.set $8 - f64.const 0.00833333333332249 global.get $~lib/math/rempio2_y0 - local.tee $0 - local.tee $5 - local.get $5 + local.tee $9 + f64.const 0.00833333333332249 + local.get $9 + local.get $9 f64.mul local.tee $4 f64.const -1.984126982985795e-04 @@ -10935,19 +10935,18 @@ f64.add f64.mul f64.add - local.set $6 - local.get $5 + local.set $0 local.get $4 f64.const 0.5 global.get $~lib/math/rempio2_y1 - local.tee $9 + local.tee $6 local.tee $3 f64.mul local.get $4 - local.get $5 + local.get $9 f64.mul local.tee $1 - local.get $6 + local.get $0 f64.mul f64.sub f64.mul @@ -10958,22 +10957,22 @@ f64.mul f64.sub f64.sub - local.tee $6 + local.tee $5 local.set $1 f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $9 + local.get $9 f64.mul local.tee $4 f64.mul - local.tee $5 - f64.sub local.tee $3 + f64.sub + local.tee $0 f64.const 1 - local.get $3 + local.get $0 f64.sub - local.get $5 + local.get $3 f64.sub local.get $4 local.get $4 @@ -10990,8 +10989,8 @@ local.get $4 local.get $4 f64.mul - local.tee $3 - local.get $3 + local.tee $0 + local.get $0 f64.mul f64.const -2.7557314351390663e-07 local.get $4 @@ -11005,8 +11004,8 @@ f64.mul f64.add f64.mul - local.get $0 local.get $9 + local.get $6 f64.mul f64.sub f64.add @@ -11017,7 +11016,7 @@ i32.const 1 i32.and if - local.get $6 + local.get $5 f64.neg local.set $3 local.get $0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 81df92c34f..7f56261ea4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -2080,11 +2080,11 @@ (local $8 i32) local.get $0 i32.load offset=8 - local.set $6 + local.set $5 local.get $0 i32.load offset=16 - local.tee $7 local.tee $4 + local.tee $8 i32.const 1073741808 i32.gt_u if @@ -2095,11 +2095,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $4 + local.tee $2 + local.get $8 call $~lib/memory/memory.fill i32.const 16 i32.const 4 @@ -2117,39 +2117,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $8 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $8 + 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 - local.get $4 + local.get $8 i32.store offset=8 local.get $0 - local.get $4 + local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $5 local.get $7 + local.get $4 i32.lt_s if - local.get $6 local.get $5 + local.get $7 i32.const 3 i32.shl i32.add @@ -2159,21 +2159,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $6 local.get $2 i32.load8_s call $~lib/array/Array#__set + local.get $6 + i32.const 1 + i32.add + local.set $6 end - local.get $5 + local.get $7 i32.const 1 i32.add - local.set $5 + local.set $7 br $for-loop|0 end end @@ -2844,11 +2843,11 @@ (local $8 i32) local.get $0 i32.load offset=8 - local.set $6 + local.set $5 local.get $0 i32.load offset=16 - local.tee $7 local.tee $4 + local.tee $8 i32.const 1073741808 i32.gt_u if @@ -2859,11 +2858,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $4 + local.tee $2 + local.get $8 call $~lib/memory/memory.fill i32.const 16 i32.const 6 @@ -2881,39 +2880,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $8 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $8 + 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 - local.get $4 + local.get $8 i32.store offset=8 local.get $0 - local.get $4 + local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $5 local.get $7 + local.get $4 i32.lt_s if - local.get $6 local.get $5 + local.get $7 i32.const 3 i32.shl i32.add @@ -2923,21 +2922,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $6 local.get $2 i32.load8_u call $~lib/array/Array#__set + local.get $6 + i32.const 1 + i32.add + local.set $6 end - local.get $5 + local.get $7 i32.const 1 i32.add - local.set $5 + local.set $7 br $for-loop|0 end end @@ -3699,12 +3697,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 536870904 i32.gt_u if @@ -3718,11 +3716,11 @@ local.get $6 i32.const 1 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 8 @@ -3740,39 +3738,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 3 i32.shl i32.add @@ -3782,21 +3780,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i32.load16_s call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -4470,12 +4467,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 536870904 i32.gt_u if @@ -4489,11 +4486,11 @@ local.get $6 i32.const 1 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 10 @@ -4511,39 +4508,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 3 i32.shl i32.add @@ -4553,21 +4550,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i32.load16_u call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -5337,12 +5333,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 268435452 i32.gt_u if @@ -5356,11 +5352,11 @@ local.get $6 i32.const 2 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 12 @@ -5378,39 +5374,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 3 i32.shl i32.add @@ -5420,21 +5416,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i32.load call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -5861,12 +5856,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 268435452 i32.gt_u if @@ -5880,11 +5875,11 @@ local.get $6 i32.const 2 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 14 @@ -5902,39 +5897,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 3 i32.shl i32.add @@ -5944,21 +5939,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i32.load call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -6706,12 +6700,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 134217726 i32.gt_u if @@ -6725,11 +6719,11 @@ local.get $6 i32.const 3 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 16 @@ -6747,39 +6741,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 4 i32.shl i32.add @@ -6789,21 +6783,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i64.load call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -7232,12 +7225,12 @@ (local $9 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $4 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $7 local.set $6 - local.get $5 + local.get $7 i32.const 134217726 i32.gt_u if @@ -7251,11 +7244,11 @@ local.get $6 i32.const 3 i32.shl - local.tee $7 + local.tee $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $5 call $~lib/memory/memory.fill i32.const 16 i32.const 18 @@ -7273,39 +7266,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 - local.get $7 + local.get $5 i32.store offset=8 local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $7 i32.lt_s if - local.get $8 local.get $4 + local.get $9 i32.const 4 i32.shl i32.add @@ -7315,21 +7308,20 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $0 - local.get $1 + local.get $8 local.get $2 i64.load call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 end - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end @@ -7967,49 +7959,49 @@ local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 local.get $7 call $~lib/memory/memory.fill i32.const 16 i32.const 20 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 + local.get $1 + local.set $2 + local.get $1 local.get $0 - local.set $1 - local.get $0 - local.get $3 i32.load local.tee $9 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $9 call $~lib/rt/pure/__release end - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.store - local.get $3 local.get $0 + local.get $1 i32.store offset=4 - local.get $3 + local.get $0 local.get $7 i32.store offset=8 - local.get $3 + local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 @@ -8028,20 +8020,16 @@ i32.and i32.eqz if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 local.get $1 f32.load local.set $10 - local.get $0 local.get $3 + local.tee $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 @@ -8052,25 +8040,29 @@ call $~lib/builtins/abort unreachable end - local.get $3 local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 2 call $~lib/array/ensureSize - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.store offset=12 end - local.get $3 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add local.get $10 f32.store + local.get $1 + i32.const 1 + i32.add + local.set $3 end local.get $4 i32.const 1 @@ -8079,7 +8071,7 @@ br $for-loop|0 end end - local.get $3 + local.get $0 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 @@ -8795,49 +8787,49 @@ local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 local.get $7 call $~lib/memory/memory.fill i32.const 16 i32.const 22 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 + local.get $1 + local.set $2 + local.get $1 local.get $0 - local.set $1 - local.get $0 - local.get $3 i32.load local.tee $9 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $9 call $~lib/rt/pure/__release end - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.store - local.get $3 local.get $0 + local.get $1 i32.store offset=4 - local.get $3 + local.get $0 local.get $7 i32.store offset=8 - local.get $3 + local.get $0 local.get $6 i32.store offset=12 loop $for-loop|0 @@ -8856,20 +8848,16 @@ i32.and i32.eqz if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 local.get $1 f64.load local.set $10 - local.get $0 local.get $3 + local.tee $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 @@ -8880,25 +8868,29 @@ call $~lib/builtins/abort unreachable end - local.get $3 local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 3 call $~lib/array/ensureSize - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.store offset=12 end - local.get $3 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 3 i32.shl i32.add local.get $10 f64.store + local.get $1 + i32.const 1 + i32.add + local.set $3 end local.get $4 i32.const 1 @@ -8907,7 +8899,7 @@ br $for-loop|0 end end - local.get $3 + local.get $0 ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) local.get $1 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2053158093..25d51950d6 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1454,11 +1454,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 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index ce97927fe1..d002ef6ac1 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6551,7 +6551,7 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 local.get $7 i32.const 1 @@ -6568,17 +6568,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + local.get $6 i64.mul local.get $2 i64.const 4294967295 @@ -6621,28 +6618,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $6 i64.mul local.get $5 - local.get $6 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $5 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i64.add local.get $2 - local.get $10 - i64.mul local.get $6 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -6664,13 +6664,13 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $5 local.get $3 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $6 + local.get $5 local.get $3 i64.const 4294967295 i64.and @@ -6690,7 +6690,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $6 i64.mul local.get $3 i64.const 4294967295 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 13a61da9ff..36ae25dcb6 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1482,7 +1482,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 @@ -1504,24 +1504,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 @@ -2148,27 +2149,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 @@ -2178,24 +2169,19 @@ 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 $0 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $4 + local.set $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 i32.const 0 @@ -2205,13 +2191,31 @@ 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.set $1 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + 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.get $0 local.get $1 local.get $0 @@ -2222,7 +2226,7 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $4 + local.get $2 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64) @@ -2253,27 +2257,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 @@ -2283,24 +2277,19 @@ 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 $0 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $4 + local.set $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 i32.const 0 @@ -2310,13 +2299,31 @@ 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.set $1 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + 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.get $0 local.get $1 local.get $0 @@ -2327,7 +2334,7 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $4 + local.get $2 call $~lib/rt/pure/__retain ) (func $~setArgumentsLength (param $0 i32) @@ -2882,7 +2889,7 @@ i32.lt_s select end - local.tee $0 + local.tee $2 local.get $3 i32.const 0 i32.lt_s @@ -2890,9 +2897,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 @@ -2904,15 +2911,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 @@ -3214,19 +3221,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 @@ -3234,9 +3231,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 @@ -3248,12 +3245,7 @@ i32.lt_s select end - local.tee $1 - local.get $3 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $0 + local.set $0 local.get $2 i32.const 0 i32.lt_s @@ -3261,9 +3253,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 @@ -3275,16 +3267,32 @@ i32.lt_s select end + local.set $1 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc local.tee $2 - local.get $1 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + local.get $3 + i32.load offset=4 + i32.add + i32.store offset=4 local.get $2 local.get $1 + local.get $0 + local.get $1 + local.get $0 i32.gt_s select - local.get $1 + local.get $0 i32.sub i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -8419,31 +8427,15 @@ (func $~lib/typedarray/Uint8Array#subarray (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.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.load offset=8 + local.tee $2 i32.const 4 local.get $2 i32.lt_s select - local.tee $4 - local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $3 + local.set $3 local.get $1 i32.const 0 i32.lt_s @@ -8451,9 +8443,9 @@ local.get $1 local.get $2 i32.add - local.tee $0 + local.tee $1 i32.const 0 - local.get $0 + local.get $1 i32.const 0 i32.gt_s select @@ -8465,16 +8457,32 @@ i32.lt_s select end - local.tee $0 - local.get $4 + local.set $1 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $4 + 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 $4 + local.get $3 i32.sub i32.store offset=8 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> @@ -8629,31 +8637,15 @@ (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 - 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 + local.tee $2 i32.const 4 local.get $2 i32.lt_s select - local.tee $4 - local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $3 + local.set $3 local.get $1 i32.const 0 i32.lt_s @@ -8661,9 +8653,9 @@ local.get $1 local.get $2 i32.add - local.tee $0 + local.tee $1 i32.const 0 - local.get $0 + local.get $1 i32.const 0 i32.gt_s select @@ -8675,16 +8667,32 @@ i32.lt_s select end - local.tee $0 - local.get $4 + local.set $1 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $4 + 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 $4 + local.get $3 i32.sub i32.store offset=8 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> @@ -8895,42 +8903,23 @@ (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - 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 - i32.const 4 - local.get $3 i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -8940,24 +8929,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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 $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> @@ -9174,42 +9181,23 @@ (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - 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 i32.const 4 - local.get $3 - i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -9219,24 +9207,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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.get $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 1 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> @@ -9591,42 +9597,23 @@ (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - 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 - i32.const 4 - local.get $3 i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -9636,24 +9623,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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.get $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> @@ -9858,42 +9863,23 @@ (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - 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 - i32.const 4 - local.get $3 i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -9903,24 +9889,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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 $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> @@ -10072,42 +10076,23 @@ (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - 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 - i32.const 4 - local.get $3 i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -10117,24 +10102,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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 $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> @@ -10342,42 +10345,23 @@ (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - 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 i32.const 4 - local.get $3 - i32.const 4 - local.get $3 + local.get $2 i32.lt_s select - local.tee $4 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.tee $0 + local.set $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $2 i32.add local.tee $1 i32.const 0 @@ -10387,24 +10371,42 @@ select else local.get $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select end - local.tee $1 - local.get $4 + 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 $4 + local.get $3 + local.get $1 + local.get $3 i32.gt_s select - local.get $4 + local.get $3 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $2 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> @@ -18767,7 +18769,7 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 local.get $7 i32.const 1 @@ -18784,17 +18786,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + local.get $6 i64.mul local.get $2 i64.const 4294967295 @@ -18837,28 +18836,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $6 i64.mul local.get $5 - local.get $6 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $5 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i64.add local.get $2 - local.get $10 - i64.mul local.get $6 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -18880,13 +18882,13 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $5 local.get $3 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $6 + local.get $5 local.get $3 i64.const 4294967295 i64.and @@ -18906,7 +18908,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $6 i64.mul local.get $3 i64.const 4294967295 @@ -26964,14 +26966,14 @@ i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $28 + local.tee $27 i32.const 5 i32.const 2 i32.const 15 i32.const 2096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26994,14 +26996,14 @@ i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 + local.tee $26 i32.const 5 i32.const 2 i32.const 15 i32.const 2144 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27016,21 +27018,22 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice + local.set $28 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $28 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $24 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 2192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $19 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27045,14 +27048,14 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 + local.get $28 call $~lib/rt/pure/__release local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $28 i32.const 5 i32.const 2 i32.const 15 @@ -27248,10 +27251,9 @@ 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 + local.tee $0 i32.const -4 i32.const -3 i32.const -1 @@ -27278,15 +27280,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 @@ -27304,12 +27306,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $29 call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release local.get $25 @@ -27322,6 +27322,8 @@ call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release local.get $17 @@ -27352,7 +27354,7 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index fba2d7309d..4eab589400 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1381,7 +1381,7 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 local.get $7 i32.const 1 @@ -1398,17 +1398,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $5 + local.get $6 i64.mul local.get $2 i64.const 4294967295 @@ -1451,28 +1448,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $6 i64.mul local.get $5 - local.get $6 + local.get $3 + i64.const 4294967295 + i64.and + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $5 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i64.add local.get $2 - local.get $10 - i64.mul local.get $6 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1494,13 +1494,13 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $5 local.get $3 i64.const 32 i64.shr_u - local.tee $5 + local.tee $6 i64.mul - local.get $6 + local.get $5 local.get $3 i64.const 4294967295 i64.and @@ -1520,7 +1520,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $6 i64.mul local.get $3 i64.const 4294967295 From 99a78ddec4c424b2c10b61f9e096fa8d08ef8cfb Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 17:12:50 +0300 Subject: [PATCH 07/34] use notee version for early simplify-locals --- cli/asc.js | 2 +- .../resolve-elementaccess.optimized.wat | 75 ++-- tests/compiler/std/array.optimized.wat | 75 ++-- tests/compiler/std/libm.optimized.wat | 345 +++++++++--------- tests/compiler/std/math.optimized.wat | 345 +++++++++--------- .../std/operator-overloading.optimized.wat | 237 ++++++------ .../std/string-casemapping.optimized.wat | 2 +- tests/compiler/std/string.optimized.wat | 75 ++-- tests/compiler/std/typedarray.optimized.wat | 75 ++-- tests/compiler/wasi/trace.optimized.wat | 75 ++-- 10 files changed, 649 insertions(+), 657 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index f8f3a0b6dc..9c13864493 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -701,7 +701,7 @@ exports.main = function main(argv, options, callback) { } if (optimizeLevel >= 3) { add("flatten"); // differs - add("simplify-locals-nostructure"); // differs + add("simplify-locals-notee-nostructure"); // differs add("vacuum"); // differs add("flatten"); add("local-cse"); diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 22e0398dc8..16feab797f 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1272,15 +1272,15 @@ (local $3 i64) (local $4 i32) (local $5 i64) - (local $6 i64) - (local $7 i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $7 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -1297,22 +1297,15 @@ i64.const 52 i64.shr_u i32.wrap_i64 - 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 + local.tee $6 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 @@ -1320,14 +1313,25 @@ 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 $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 @@ -1339,16 +1343,11 @@ i64.shl i64.const 1 i64.sub - local.get $8 + local.get $6 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 @@ -1399,7 +1398,7 @@ i64.and local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -1414,14 +1413,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $6 + local.get $7 i64.mul local.get $2 i64.const 4294967295 @@ -1450,7 +1449,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $8 + local.get $6 local.get $0 i32.sub i32.add @@ -1464,19 +1463,19 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $5 + local.tee $10 + local.get $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $5 + local.get $10 i64.mul i64.const 32 i64.shr_u @@ -1486,7 +1485,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $5 i64.const 4294967295 @@ -1514,13 +1513,13 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -1536,7 +1535,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -1550,13 +1549,13 @@ i64.const 1 i64.add i64.sub - local.get $7 + local.get $8 call $~lib/util/number/genDigits - local.get $7 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $7 + local.get $8 i32.add ) (func $~lib/string/String#get:length (param $0 i32) (result i32) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 3019dedfd9..aee801a0b3 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -7374,15 +7374,15 @@ (local $3 i64) (local $4 i32) (local $5 i64) - (local $6 i64) - (local $7 i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $7 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -7399,22 +7399,15 @@ i64.const 52 i64.shr_u i32.wrap_i64 - 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 + local.tee $6 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 @@ -7422,14 +7415,25 @@ 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 $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 @@ -7441,16 +7445,11 @@ i64.shl i64.const 1 i64.sub - local.get $8 + local.get $6 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 @@ -7501,7 +7500,7 @@ i64.and local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -7516,14 +7515,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $6 + local.get $7 i64.mul local.get $2 i64.const 4294967295 @@ -7552,7 +7551,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $8 + local.get $6 local.get $0 i32.sub i32.add @@ -7566,19 +7565,19 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $5 + local.tee $10 + local.get $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $5 + local.get $10 i64.mul i64.const 32 i64.shr_u @@ -7588,7 +7587,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $5 i64.const 4294967295 @@ -7616,13 +7615,13 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -7638,7 +7637,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -7652,13 +7651,13 @@ i64.const 1 i64.add i64.sub - local.get $7 + local.get $8 call $~lib/util/number/genDigits - local.get $7 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $7 + local.get $8 i32.add ) (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 i32) (param $2 f64) (result i32) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index dcd5e509eb..dd7957dedf 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1598,7 +1598,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $2 + local.tee $1 i64.const 6 i64.shr_s i32.wrap_i64 @@ -1608,45 +1608,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 @@ -1656,71 +1656,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 @@ -1728,49 +1728,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 @@ -1781,7 +1781,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -1789,7 +1789,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -1797,39 +1797,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 @@ -1844,7 +1844,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -3412,20 +3412,20 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (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 i64) - (local $15 f64) + (local $13 i64) + (local $14 f64) + (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 f64) + (local $17 f64) + (local $18 i32) (local $19 i32) - (local $20 i32) + (local $20 f64) local.get $1 f64.abs f64.const 2 @@ -3480,30 +3480,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 - local.set $19 - local.get $14 + local.set $18 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $15 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 - local.get $14 + local.tee $9 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -3511,18 +3511,18 @@ return end i32.const 1 - local.get $20 + local.get $19 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 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -3540,51 +3540,51 @@ f64.add return end - local.get $16 + local.get $15 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 i32.sub - local.tee $9 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $9 + local.get $10 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 - local.get $8 + local.get $19 + local.get $9 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u - local.tee $9 + local.tee $10 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 @@ -3594,14 +3594,14 @@ end local.set $5 end - local.get $20 + local.get $19 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -3613,7 +3613,7 @@ if local.get $1 f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -3622,7 +3622,7 @@ local.get $1 f64.neg f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -3635,11 +3635,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 @@ -3651,7 +3651,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -3660,11 +3660,11 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $15 i32.const 0 i32.ge_s if @@ -3677,7 +3677,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -3696,12 +3696,12 @@ local.get $2 f64.div local.get $2 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -3734,7 +3734,7 @@ end f64.const 1 local.set $6 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -3757,11 +3757,11 @@ select local.set $6 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 @@ -3771,7 +3771,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -3783,7 +3783,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -3804,7 +3804,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -3824,7 +3824,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -3862,9 +3862,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $0 - local.get $11 + local.get $7 local.get $2 f64.sub f64.sub @@ -3892,7 +3892,7 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $8 local.get $4 i32.const 1048575 i32.and @@ -3909,18 +3909,19 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 local.get $4 i32.const -1048576 i32.add local.set $4 end end + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3931,51 +3932,49 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.const 1.5 f64.const 1 - local.get $17 + local.get $16 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $12 + local.get $7 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 $15 - local.get $15 - f64.mul - local.set $11 - f64.const 0.9617967009544373 - local.get $15 + local.tee $14 f64.const 3 - local.get $11 + local.get $14 + local.get $14 + f64.mul + local.tee $20 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $13 - local.get $13 + local.tee $12 + local.get $12 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $12 f64.const 0.4285714285785502 - local.get $13 + local.get $12 f64.const 0.33333332981837743 - local.get $13 + local.get $12 f64.const 0.272728123808534 - local.get $13 + local.get $12 f64.const 0.23066074577556175 - local.get $13 + local.get $12 f64.const 0.20697501780033842 f64.mul f64.add @@ -3990,7 +3989,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $14 local.get $4 i32.const 1 i32.shr_s @@ -3998,7 +3997,7 @@ i32.or i32.const 524288 i32.add - local.get $17 + local.get $16 i32.const 18 i32.shl i32.add @@ -4009,8 +4008,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $12 + local.get $14 + local.get $7 local.get $0 local.get $3 f64.sub @@ -4019,8 +4018,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $18 + local.get $14 + local.get $17 f64.add f64.mul f64.add @@ -4030,20 +4029,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $7 f64.mul local.get $0 - local.get $12 + local.get $7 f64.const 3 f64.sub - local.get $11 + local.get $20 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -4054,7 +4053,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $12 + local.tee $20 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -4068,18 +4067,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $17 + local.get $16 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $17 + local.get $16 select local.tee $2 f64.add - local.get $7 + local.get $8 f64.convert_i32_s local.tee $0 f64.add @@ -4087,14 +4086,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $3 - local.get $11 + local.get $7 local.get $0 f64.sub local.get $2 f64.sub - local.get $12 + local.get $20 f64.sub f64.sub end @@ -4107,7 +4106,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $11 + local.get $7 f64.mul local.get $1 local.get $2 @@ -4115,27 +4114,27 @@ f64.add local.tee $1 local.get $0 - local.get $11 + local.get $7 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -4149,14 +4148,14 @@ i32.or br_if $folding-inner0 else - local.get $10 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -4169,30 +4168,30 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and - local.tee $9 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $7 - local.get $9 + local.set $8 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $9 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -4203,7 +4202,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $9 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -4211,7 +4210,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $9 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -4220,14 +4219,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $7 + local.tee $8 i32.sub - local.get $7 - local.get $10 + local.get $8 + local.get $11 i32.const 0 i32.lt_s select - local.set $7 + local.set $8 local.get $3 local.get $0 f64.sub @@ -4310,7 +4309,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $8 i32.const 20 i32.shl i32.add @@ -4321,7 +4320,7 @@ i32.le_s if (result f64) local.get $0 - local.get $7 + local.get $8 call $~lib/math/NativeMath.scalbn else local.get $0 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 76e176f237..f6c655a2f0 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3305,7 +3305,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $2 + local.tee $1 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3315,45 +3315,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 @@ -3363,71 +3363,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 @@ -3435,49 +3435,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 @@ -3488,7 +3488,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -3496,7 +3496,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -3504,39 +3504,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 @@ -3551,7 +3551,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -7106,20 +7106,20 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (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 i64) - (local $15 f64) + (local $13 i64) + (local $14 f64) + (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 f64) + (local $17 f64) + (local $18 i32) (local $19 i32) - (local $20 i32) + (local $20 f64) local.get $1 f64.abs f64.const 2 @@ -7174,30 +7174,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 - local.set $19 - local.get $14 + local.set $18 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $15 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 - local.get $14 + local.tee $9 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -7205,18 +7205,18 @@ return end i32.const 1 - local.get $20 + local.get $19 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 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -7234,51 +7234,51 @@ f64.add return end - local.get $16 + local.get $15 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 i32.sub - local.tee $9 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $9 + local.get $10 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 - local.get $8 + local.get $19 + local.get $9 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u - local.tee $9 + local.tee $10 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 @@ -7288,14 +7288,14 @@ end local.set $5 end - local.get $20 + local.get $19 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -7307,7 +7307,7 @@ if local.get $1 f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -7316,7 +7316,7 @@ local.get $1 f64.neg f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -7329,11 +7329,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 @@ -7345,7 +7345,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -7354,11 +7354,11 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $15 i32.const 0 i32.ge_s if @@ -7371,7 +7371,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -7390,12 +7390,12 @@ local.get $2 f64.div local.get $2 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -7428,7 +7428,7 @@ end f64.const 1 local.set $6 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -7451,11 +7451,11 @@ select local.set $6 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 @@ -7465,7 +7465,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -7477,7 +7477,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -7498,7 +7498,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -7518,7 +7518,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -7556,9 +7556,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $0 - local.get $11 + local.get $7 local.get $2 f64.sub f64.sub @@ -7586,7 +7586,7 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $8 local.get $4 i32.const 1048575 i32.and @@ -7603,18 +7603,19 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 local.get $4 i32.const -1048576 i32.add local.set $4 end end + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7625,51 +7626,49 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.const 1.5 f64.const 1 - local.get $17 + local.get $16 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $12 + local.get $7 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 $15 - local.get $15 - f64.mul - local.set $11 - f64.const 0.9617967009544373 - local.get $15 + local.tee $14 f64.const 3 - local.get $11 + local.get $14 + local.get $14 + f64.mul + local.tee $20 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $13 - local.get $13 + local.tee $12 + local.get $12 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $12 f64.const 0.4285714285785502 - local.get $13 + local.get $12 f64.const 0.33333332981837743 - local.get $13 + local.get $12 f64.const 0.272728123808534 - local.get $13 + local.get $12 f64.const 0.23066074577556175 - local.get $13 + local.get $12 f64.const 0.20697501780033842 f64.mul f64.add @@ -7684,7 +7683,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $14 local.get $4 i32.const 1 i32.shr_s @@ -7692,7 +7691,7 @@ i32.or i32.const 524288 i32.add - local.get $17 + local.get $16 i32.const 18 i32.shl i32.add @@ -7703,8 +7702,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $12 + local.get $14 + local.get $7 local.get $0 local.get $3 f64.sub @@ -7713,8 +7712,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $18 + local.get $14 + local.get $17 f64.add f64.mul f64.add @@ -7724,20 +7723,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $7 f64.mul local.get $0 - local.get $12 + local.get $7 f64.const 3 f64.sub - local.get $11 + local.get $20 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -7748,7 +7747,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $12 + local.tee $20 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -7762,18 +7761,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $17 + local.get $16 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $17 + local.get $16 select local.tee $2 f64.add - local.get $7 + local.get $8 f64.convert_i32_s local.tee $0 f64.add @@ -7781,14 +7780,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $3 - local.get $11 + local.get $7 local.get $0 f64.sub local.get $2 f64.sub - local.get $12 + local.get $20 f64.sub f64.sub end @@ -7801,7 +7800,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $11 + local.get $7 f64.mul local.get $1 local.get $2 @@ -7809,27 +7808,27 @@ f64.add local.tee $1 local.get $0 - local.get $11 + local.get $7 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -7843,14 +7842,14 @@ i32.or br_if $folding-inner0 else - local.get $10 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -7863,30 +7862,30 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and - local.tee $9 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $7 - local.get $9 + local.set $8 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $9 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -7897,7 +7896,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $9 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -7905,7 +7904,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $9 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -7914,14 +7913,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $7 + local.tee $8 i32.sub - local.get $7 - local.get $10 + local.get $8 + local.get $11 i32.const 0 i32.lt_s select - local.set $7 + local.set $8 local.get $3 local.get $0 f64.sub @@ -8004,7 +8003,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $8 i32.const 20 i32.shl i32.add @@ -8015,7 +8014,7 @@ i32.le_s if (result f64) local.get $0 - local.get $7 + local.get $8 call $~lib/math/NativeMath.scalbn else local.get $0 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index a26498f6cf..6f4f2cdbe3 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -238,20 +238,20 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (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 i64) - (local $15 f64) + (local $13 i64) + (local $14 f64) + (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 f64) + (local $17 f64) + (local $18 i32) (local $19 i32) - (local $20 i32) + (local $20 f64) local.get $1 f64.abs f64.const 2 @@ -306,30 +306,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 - local.set $19 - local.get $14 + local.set $18 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $15 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 - local.get $14 + local.tee $9 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -337,18 +337,18 @@ return end i32.const 1 - local.get $20 + local.get $19 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 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -366,51 +366,51 @@ f64.add return end - local.get $16 + local.get $15 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 i32.sub - local.tee $9 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $9 + local.get $10 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 - local.get $8 + local.get $19 + local.get $9 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u - local.tee $9 + local.tee $10 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,14 +420,14 @@ end local.set $5 end - local.get $20 + local.get $19 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -439,7 +439,7 @@ if local.get $1 f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -448,7 +448,7 @@ local.get $1 f64.neg f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -461,11 +461,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 @@ -477,7 +477,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -486,11 +486,11 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $15 i32.const 0 i32.ge_s if @@ -503,7 +503,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -522,12 +522,12 @@ local.get $2 f64.div local.get $2 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -560,7 +560,7 @@ end f64.const 1 local.set $6 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -583,11 +583,11 @@ select local.set $6 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 @@ -597,7 +597,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -609,7 +609,7 @@ if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -630,7 +630,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select @@ -650,7 +650,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select @@ -688,9 +688,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $0 - local.get $11 + local.get $7 local.get $2 f64.sub f64.sub @@ -718,7 +718,7 @@ i32.const 1023 i32.sub i32.add - local.set $7 + local.set $8 local.get $4 i32.const 1048575 i32.and @@ -735,18 +735,19 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 local.get $4 i32.const -1048576 i32.add local.set $4 end end + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -757,51 +758,49 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.const 1.5 f64.const 1 - local.get $17 + local.get $16 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $12 + local.get $7 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 $15 - local.get $15 - f64.mul - local.set $11 - f64.const 0.9617967009544373 - local.get $15 + local.tee $14 f64.const 3 - local.get $11 + local.get $14 + local.get $14 + f64.mul + local.tee $20 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $13 - local.get $13 + local.tee $12 + local.get $12 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $12 f64.const 0.4285714285785502 - local.get $13 + local.get $12 f64.const 0.33333332981837743 - local.get $13 + local.get $12 f64.const 0.272728123808534 - local.get $13 + local.get $12 f64.const 0.23066074577556175 - local.get $13 + local.get $12 f64.const 0.20697501780033842 f64.mul f64.add @@ -816,7 +815,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $14 local.get $4 i32.const 1 i32.shr_s @@ -824,7 +823,7 @@ i32.or i32.const 524288 i32.add - local.get $17 + local.get $16 i32.const 18 i32.shl i32.add @@ -835,8 +834,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $12 + local.get $14 + local.get $7 local.get $0 local.get $3 f64.sub @@ -845,8 +844,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $18 + local.get $14 + local.get $17 f64.add f64.mul f64.add @@ -856,20 +855,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $12 + local.tee $7 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $7 f64.mul local.get $0 - local.get $12 + local.get $7 f64.const 3 f64.sub - local.get $11 + local.get $20 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -880,7 +879,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $12 + local.tee $20 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -894,18 +893,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $17 + local.get $16 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $17 + local.get $16 select local.tee $2 f64.add - local.get $7 + local.get $8 f64.convert_i32_s local.tee $0 f64.add @@ -913,14 +912,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $7 local.get $3 - local.get $11 + local.get $7 local.get $0 f64.sub local.get $2 f64.sub - local.get $12 + local.get $20 f64.sub f64.sub end @@ -933,7 +932,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $11 + local.get $7 f64.mul local.get $1 local.get $2 @@ -941,27 +940,27 @@ f64.add local.tee $1 local.get $0 - local.get $11 + local.get $7 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $13 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $13 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -975,14 +974,14 @@ i32.or br_if $folding-inner0 else - local.get $10 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -995,30 +994,30 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and - local.tee $9 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $7 - local.get $9 + local.set $8 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $9 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -1029,7 +1028,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $9 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -1037,7 +1036,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $9 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -1046,14 +1045,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $7 + local.tee $8 i32.sub - local.get $7 - local.get $10 + local.get $8 + local.get $11 i32.const 0 i32.lt_s select - local.set $7 + local.set $8 local.get $3 local.get $0 f64.sub @@ -1136,7 +1135,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $7 + local.get $8 i32.const 20 i32.shl i32.add @@ -1147,7 +1146,7 @@ i32.le_s if (result f64) local.get $0 - local.get $7 + local.get $8 call $~lib/math/NativeMath.scalbn else local.get $0 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 25d51950d6..5ed361c784 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2459,9 +2459,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 d002ef6ac1..c59961e8d7 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6426,15 +6426,15 @@ (local $3 i64) (local $4 i32) (local $5 i64) - (local $6 i64) - (local $7 i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $7 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -6451,22 +6451,15 @@ i64.const 52 i64.shr_u i32.wrap_i64 - 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 + local.tee $6 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 @@ -6474,14 +6467,25 @@ 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 $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 @@ -6493,16 +6497,11 @@ i64.shl i64.const 1 i64.sub - local.get $8 + local.get $6 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 @@ -6553,7 +6552,7 @@ i64.and local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -6568,14 +6567,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $6 + local.get $7 i64.mul local.get $2 i64.const 4294967295 @@ -6604,7 +6603,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $8 + local.get $6 local.get $0 i32.sub i32.add @@ -6618,19 +6617,19 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $5 + local.tee $10 + local.get $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $5 + local.get $10 i64.mul i64.const 32 i64.shr_u @@ -6640,7 +6639,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $5 i64.const 4294967295 @@ -6668,13 +6667,13 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -6690,7 +6689,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -6704,13 +6703,13 @@ i64.const 1 i64.add i64.sub - local.get $7 + local.get $8 call $~lib/util/number/genDigits - local.get $7 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $7 + local.get $8 i32.add ) (func $~lib/util/number/dtoa (param $0 f64) (result i32) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 36ae25dcb6..f1b2294396 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -18644,15 +18644,15 @@ (local $3 i64) (local $4 i32) (local $5 i64) - (local $6 i64) - (local $7 i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $7 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -18669,22 +18669,15 @@ i64.const 52 i64.shr_u i32.wrap_i64 - 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 + local.tee $6 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 @@ -18692,14 +18685,25 @@ 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 $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 @@ -18711,16 +18715,11 @@ i64.shl i64.const 1 i64.sub - local.get $8 + local.get $6 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 @@ -18771,7 +18770,7 @@ i64.and local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -18786,14 +18785,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $6 + local.get $7 i64.mul local.get $2 i64.const 4294967295 @@ -18822,7 +18821,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $8 + local.get $6 local.get $0 i32.sub i32.add @@ -18836,19 +18835,19 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $5 + local.tee $10 + local.get $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $5 + local.get $10 i64.mul i64.const 32 i64.shr_u @@ -18858,7 +18857,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $5 i64.const 4294967295 @@ -18886,13 +18885,13 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -18908,7 +18907,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -18922,13 +18921,13 @@ i64.const 1 i64.add i64.sub - local.get $7 + local.get $8 call $~lib/util/number/genDigits - local.get $7 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $7 + local.get $8 i32.add ) (func $~lib/util/number/dtoa (param $0 f64) (result i32) diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 4eab589400..b3af7776d7 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1256,15 +1256,15 @@ (local $3 i64) (local $4 i32) (local $5 i64) - (local $6 i64) - (local $7 i32) + (local $6 i32) + (local $7 i64) (local $8 i32) (local $9 i32) (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $7 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -1281,22 +1281,15 @@ i64.const 52 i64.shr_u i32.wrap_i64 - 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 + local.tee $6 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 @@ -1304,14 +1297,25 @@ 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 $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 @@ -1323,16 +1327,11 @@ i64.shl i64.const 1 i64.sub - local.get $8 + local.get $6 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 @@ -1383,7 +1382,7 @@ i64.and local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -1398,14 +1397,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 local.get $3 i64.const 32 i64.shr_u local.tee $10 i64.mul local.get $5 - local.get $6 + local.get $7 i64.mul local.get $2 i64.const 4294967295 @@ -1434,7 +1433,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $8 + local.get $6 local.get $0 i32.sub i32.add @@ -1448,19 +1447,19 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $5 + local.tee $10 + local.get $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $5 + local.get $10 i64.mul i64.const 32 i64.shr_u @@ -1470,7 +1469,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $5 i64.const 4294967295 @@ -1498,13 +1497,13 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $6 + local.tee $7 i64.mul - local.get $5 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -1520,7 +1519,7 @@ i64.shr_u i64.add local.get $2 - local.get $6 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -1534,13 +1533,13 @@ i64.const 1 i64.add i64.sub - local.get $7 + local.get $8 call $~lib/util/number/genDigits - local.get $7 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $7 + local.get $8 i32.add ) (func $~lib/util/number/dtoa_stream (param $0 i32) (param $1 f64) (result i32) From ea9910c84235c2753c15654f0e317132462c227c Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 16 Apr 2020 23:08:07 +0300 Subject: [PATCH 08/34] add inlining before licm --- cli/asc.js | 1 + tests/compiler/assert-nonnull.optimized.wat | 22 +- tests/compiler/builtins.optimized.wat | 48 +- tests/compiler/constructor.optimized.wat | 9 +- tests/compiler/do.optimized.wat | 78 +- .../extends-baseaggregate.optimized.wat | 89 +- tests/compiler/for.optimized.wat | 16 +- tests/compiler/infer-array.optimized.wat | 20 +- tests/compiler/issues/1095.optimized.wat | 19 +- tests/compiler/managed-cast.optimized.wat | 127 +- tests/compiler/number.optimized.wat | 48 +- tests/compiler/possibly-null.optimized.wat | 8 +- tests/compiler/resolve-binary.optimized.wat | 48 +- .../resolve-elementaccess.optimized.wat | 78 +- .../resolve-function-expression.optimized.wat | 44 +- tests/compiler/resolve-nested.optimized.wat | 14 +- tests/compiler/resolve-new.optimized.wat | 6 +- .../resolve-propertyaccess.optimized.wat | 48 +- tests/compiler/resolve-unary.optimized.wat | 48 +- .../retain-release-sanity.optimized.wat | 167 +- tests/compiler/retain-release.optimized.wat | 15 +- tests/compiler/rt/instanceof.optimized.wat | 14 +- tests/compiler/std/array-access.optimized.wat | 6 +- .../compiler/std/array-literal.optimized.wat | 2 +- tests/compiler/std/array.optimized.wat | 2895 ++++---- tests/compiler/std/arraybuffer.optimized.wat | 207 +- tests/compiler/std/dataview.optimized.wat | 430 +- tests/compiler/std/map.optimized.wat | 722 +- tests/compiler/std/math.optimized.wat | 30 +- tests/compiler/std/new.optimized.wat | 67 +- .../object-literal-unmanaged.optimized.wat | 4 +- .../compiler/std/object-literal.optimized.wat | 53 +- tests/compiler/std/object.optimized.wat | 48 +- tests/compiler/std/set.optimized.wat | 28 +- tests/compiler/std/staticarray.optimized.wat | 21 +- .../std/string-encoding.optimized.wat | 8 +- tests/compiler/std/symbol.optimized.wat | 154 +- tests/compiler/std/typedarray.optimized.wat | 5872 ++++++++--------- tests/compiler/typeof.optimized.wat | 48 +- tests/compiler/while.optimized.wat | 67 +- 40 files changed, 5714 insertions(+), 5915 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 9c13864493..68f3e5d1b3 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -741,6 +741,7 @@ exports.main = function main(argv, options, callback) { // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); // } + add("inlining"); // differs if (optimizeLevel >= 3 && shrinkLevel <= 1) { // differs add("licm"); } diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 870af63c48..a0409f68d3 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -140,12 +140,13 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz br_if $folding-inner0 i32.load @@ -166,12 +167,13 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz br_if $folding-inner0 i32.load @@ -213,8 +215,8 @@ (local $1 i32) local.get $0 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -235,8 +237,8 @@ local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 6519d8b304..e73abb14d1 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -111,16 +111,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -146,28 +146,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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 $start:builtins~anonymous|0 nop diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index a7cb4810c7..c3024b02dc 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -90,6 +90,7 @@ local.get $4 ) (func $~start + (local $0 i32) i32.const 1024 global.set $~lib/rt/stub/offset i32.const 0 @@ -127,12 +128,14 @@ i32.const 0 i32.const 12 call $~lib/rt/stub/__alloc - i32.eqz - if + local.tee $0 + if (result i32) + local.get $0 + else i32.const 0 i32.const 12 call $~lib/rt/stub/__alloc - drop end + drop ) ) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index b90edfe6eb..d7d4c2c3ed 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1050,19 +1050,19 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $0 + local.set $1 loop $do-continue|0 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 br_if $do-continue|0 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1071,7 +1071,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1087,17 +1087,17 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $1 + local.set $0 loop $do-continue|00 - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $1 - local.get $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 @@ -1212,22 +1212,22 @@ i32.const 0 global.set $do/ran i32.const 0 - local.set $1 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $do-continue|04 - local.get $1 + local.get $0 i32.const 1 i32.add - local.tee $1 + local.tee $0 i32.const 10 i32.ne if loop $do-continue|1 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.rem_s br_if $do-continue|1 @@ -1235,7 +1235,7 @@ br $do-continue|04 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1246,7 +1246,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 90 i32.ne if @@ -1262,7 +1262,7 @@ i32.const 0 global.set $do/ran call $do/Ref#constructor - local.set $1 + local.set $0 loop $do-continue|05 local.get $2 i32.const 1 @@ -1272,20 +1272,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 $do/Ref#constructor - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 br_if $do-continue|05 end local.get $2 @@ -1299,7 +1299,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1310,7 +1310,7 @@ end i32.const 1 global.set $do/ran - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $do/ran i32.eqz @@ -1327,7 +1327,7 @@ i32.const 0 local.set $2 call $do/Ref#constructor - local.set $1 + local.set $0 loop $do-continue|06 block $do-break|0 local.get $2 @@ -1337,19 +1337,19 @@ i32.const 10 i32.eq if - local.get $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 - local.set $1 + local.set $0 br $do-break|0 end call $do/Ref#constructor - local.tee $0 + local.tee $1 call $~lib/rt/pure/__release - local.get $0 + local.get $1 br_if $do-continue|06 end end @@ -1364,7 +1364,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1375,7 +1375,7 @@ end i32.const 1 global.set $do/ran - local.get $1 + local.get $0 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 99a4a8a378..8d981b4289 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,9 +1,9 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param 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))) @@ -1580,47 +1580,24 @@ end end ) - (func $start:extends-baseaggregate - (local $0 i32) + (func $~lib/array/Array#push (param $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 1116 i32.load local.tee $6 i32.const 1 i32.add - local.tee $3 + local.tee $2 local.set $1 - local.get $3 + local.get $2 i32.const 1112 i32.load - local.tee $4 + local.tee $3 i32.const 2 i32.shr_u i32.gt_u @@ -1638,37 +1615,37 @@ end i32.const 1104 i32.load - local.set $5 - local.get $4 + local.set $4 + local.get $3 call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 2 i32.shl - local.tee $1 + local.tee $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $1 i32.add - local.get $1 - local.get $4 + local.get $5 + local.get $3 i32.sub call $~lib/memory/memory.fill - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.ne if i32.const 1104 - local.get $2 + local.get $1 i32.store i32.const 1108 - local.get $2 + local.get $1 i32.store end i32.const 1112 - local.get $1 + local.get $5 i32.store end i32.const 1108 @@ -1681,8 +1658,35 @@ call $~lib/rt/pure/__retain i32.store i32.const 1116 - local.get $3 + local.get $2 i32.store + ) + (func $~start + (local $0 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 + local.get $0 + call $~lib/array/Array#push local.get $0 i32.const 1564 i32.gt_u @@ -1693,9 +1697,6 @@ call $~lib/rt/pure/decrement end ) - (func $~start - call $start:extends-baseaggregate - ) (func $~lib/rt/pure/markGray (param $0 i32) (local $1 i32) local.get $0 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2be8dc74ea..e9574e0fe1 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1183,14 +1183,14 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|04 + loop $for-loop|05 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $for-loop|04 + br_if $for-loop|05 end local.get $1 i32.const 10 @@ -1213,7 +1213,7 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|05 + loop $for-loop|07 local.get $1 i32.const 10 i32.lt_s @@ -1222,7 +1222,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|05 + br $for-loop|07 end end local.get $1 @@ -1263,7 +1263,7 @@ global.set $for/ran call $for/Ref#constructor local.set $1 - loop $for-loop|06 + loop $for-loop|04 local.get $1 if local.get $3 @@ -1288,7 +1288,7 @@ end local.get $0 local.set $1 - br $for-loop|06 + br $for-loop|04 end end local.get $3 @@ -1331,7 +1331,7 @@ call $for/Ref#constructor local.set $0 call $~lib/rt/pure/__release - loop $for-loop|07 + loop $for-loop|06 block $for-break0 call $for/Ref#constructor local.tee $1 @@ -1358,7 +1358,7 @@ local.get $0 call $~lib/rt/pure/__release local.set $0 - br $for-loop|07 + br $for-loop|06 end end end diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 4d93f0286b..ddcc193399 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -288,7 +288,6 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/stub/__alloc @@ -296,26 +295,27 @@ local.get $0 local.get $1 i32.shl - local.tee $4 - local.set $6 - local.get $4 + local.tee $1 + local.set $5 + local.get $1 i32.const 0 call $~lib/rt/stub/__alloc - local.set $1 + local.set $4 local.get $3 if - local.get $1 + local.get $4 local.get $3 - local.get $6 + local.get $5 call $~lib/memory/memory.copy end - local.get $1 + local.get $4 + local.tee $3 i32.store local.get $2 - local.get $1 + local.get $3 i32.store offset=4 local.get $2 - local.get $4 + local.get $1 i32.store offset=8 local.get $2 local.get $0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 0b7e5fb6a5..80b9663484 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -963,12 +963,13 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1200 i32.store - local.get $0 + local.get $1 + local.tee $0 i32.load - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -978,20 +979,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 local.get $0 i32.load - local.tee $2 + local.tee $1 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 $1 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 call $~lib/rt/pure/__release diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 659851c9dc..d91471cd71 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,9 +1,9 @@ (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_=>_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))) @@ -1007,7 +1007,7 @@ end i32.const 0 ) - (func $~start + (func $start:managed-cast (local $0 i32) (local $1 i32) (local $2 i32) @@ -1016,14 +1016,8 @@ (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 + local.set $2 call $managed-cast/Cat#constructor local.tee $3 i32.eqz @@ -1054,63 +1048,72 @@ call $managed-cast/Cat#constructor 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 + 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 + call $managed-cast/Cat#constructor + local.tee $0 + call $~lib/rt/__instanceof + i32.eqz + if + i32.const 0 + i32.const 1200 + i32.const 41 + i32.const 30 + call $~lib/builtins/abort + unreachable end - i32.const 0 - i32.const 1200 - i32.const 36 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - call $managed-cast/Cat#constructor - local.tee $0 - call $~lib/rt/__instanceof - i32.eqz - if - i32.const 0 - i32.const 1200 - i32.const 41 - i32.const 30 - call $~lib/builtins/abort - unreachable + call $managed-cast/Cat#constructor + local.tee $7 + call $~lib/rt/__instanceof + i32.eqz + if + i32.const 0 + i32.const 1200 + i32.const 47 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + 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 $0 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + return end - call $managed-cast/Cat#constructor - local.tee $7 - call $~lib/rt/__instanceof - i32.eqz + i32.const 0 + i32.const 1200 + i32.const 36 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~start + global.get $~started if - i32.const 0 - i32.const 1200 - i32.const 47 - i32.const 30 - call $~lib/builtins/abort - unreachable + return + else + i32.const 1 + global.set $~started end - 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 $0 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release + call $start:managed-cast ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 34ff5889e5..3be345959d 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -287,16 +287,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -322,28 +322,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index cb9bd243f8..8a344aa5aa 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 - local.get $0 - local.get $1 - select - local.set $0 + if + local.get $1 + local.set $0 + end br $while-continue|0 end end diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 61ac92c7f7..aafa02de05 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -108,16 +108,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -143,28 +143,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 16feab797f..81dfd0adef 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -305,11 +305,11 @@ i32.const 2 local.get $1 i32.shl - local.tee $2 + local.tee $1 i32.const 0 call $~lib/rt/stub/__alloc - local.tee $1 - local.get $2 + local.tee $2 + local.get $1 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -332,13 +332,13 @@ i32.load drop local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) @@ -1778,16 +1778,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -1813,28 +1813,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 @@ -1878,30 +1880,28 @@ (func $~lib/number/U8#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - block $__inlined_func$~lib/util/number/utoa32 + block $__inlined_func$~lib/util/number/utoa32 (result i32) + i32.const 2624 local.get $0 i32.const 255 i32.and local.tee $1 i32.eqz - if - i32.const 2624 - local.set $0 - br $__inlined_func$~lib/util/number/utoa32 - end + br_if $__inlined_func$~lib/util/number/utoa32 + drop local.get $1 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $0 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $0 + local.tee $2 local.get $1 - local.get $2 + local.get $0 call $~lib/util/number/utoa_simple + local.get $2 end - local.get $0 ) (func $start:resolve-elementaccess (local $0 i32) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index c45ef9ad6e..e955c83e87 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -172,16 +172,16 @@ local.set $1 local.get $2 if - local.get $0 + local.get $3 i32.load16_u local.tee $2 - local.get $3 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $2 local.get $4 + local.get $2 i32.sub return end @@ -211,26 +211,26 @@ 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 - call $~lib/string/String#get:length - local.tee $1 - i32.const 1152 - 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 - br $__inlined_func$~lib/string/String.__eq - end i32.const 0 + i32.const 0 + i32.const 1 + local.get $0 + select + br_if $__inlined_func$~lib/string/String.__eq + drop + i32.const 0 + local.get $0 + call $~lib/string/String#get:length + local.tee $1 + i32.const 1152 + call $~lib/string/String#get:length + i32.ne + br_if $__inlined_func$~lib/string/String.__eq + drop + local.get $0 + local.get $1 + call $~lib/util/string/compareImpl + i32.eqz end i32.eqz if diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index af71cfe8f3..e220e7e288 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -85,23 +85,21 @@ ) (func $resolve-nested/Outer.InnerClass#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 4 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $resolve-nested/Outer.Inner.EvenInnerClass#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 5 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $resolve-nested/Outer.Inner.evenInner (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) nop diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 83de4829d8..b06a5f2b6d 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -4,7 +4,7 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $resolve-new/Foo#constructor + (func $~lib/rt/stub/__alloc (local $0 i32) (local $1 i32) (local $2 i32) @@ -72,7 +72,7 @@ (func $~start i32.const 1024 global.set $~lib/rt/stub/offset - call $resolve-new/Foo#constructor - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc + call $~lib/rt/stub/__alloc ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 7af7fe8d2b..29b5faf506 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -266,16 +266,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -301,28 +301,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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 $start:resolve-propertyaccess (local $0 i32) diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index edb2dfa477..c4ca539c77 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -273,16 +273,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -308,28 +308,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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 $start:resolve-unary (local $0 i32) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 2ce2898f0c..b0885521a0 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1776,21 +1776,22 @@ i32.const 3 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 $1 - local.tee $0 - local.get $2 + local.set $0 + local.get $1 + local.get $3 i32.load local.tee $4 i32.ne @@ -1801,26 +1802,25 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store - local.get $2 + local.get $3 local.get $1 i32.store offset=4 - local.get $2 + local.get $3 i32.const 12 i32.store offset=8 - local.get $2 + local.get $3 i32.const 3 i32.store offset=12 - local.get $2 + local.get $3 call $~lib/array/Array#push - local.get $2 + local.get $3 call $~lib/array/Array#push - local.get $2 - local.tee $1 + local.get $3 i32.load offset=12 - local.tee $0 + local.tee $1 i32.const 1 i32.lt_s if @@ -1831,21 +1831,21 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=4 - local.get $0 + 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 $1 - local.get $0 i32.store offset=12 - local.get $1 + local.get $3 call $~lib/rt/pure/__release i32.const 0 i32.const 0 @@ -1857,21 +1857,22 @@ i32.const 5 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 $1 - local.tee $0 - local.get $2 + local.set $0 + local.get $1 + local.get $3 i32.load local.tee $4 i32.ne @@ -1882,21 +1883,21 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store - local.get $2 + local.get $3 local.get $1 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 loop $for-loop|0 - local.get $3 + local.get $2 i32.const 10 i32.lt_s if @@ -1910,21 +1911,22 @@ i32.const 4 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 $1 - local.tee $0 - local.get $2 + local.set $0 + local.get $1 + local.get $3 i32.load local.tee $5 i32.ne @@ -1935,16 +1937,16 @@ local.get $5 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store - local.get $2 + local.get $3 local.get $1 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 i32.const 0 @@ -1954,15 +1956,15 @@ i32.const 10 i32.lt_s if - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.load offset=12 local.tee $5 i32.const 1 i32.add local.tee $1 call $~lib/array/ensureSize - local.get $2 + local.get $3 i32.load offset=4 local.get $5 i32.const 2 @@ -1970,7 +1972,7 @@ i32.add i32.const 1344 i32.store - local.get $2 + local.get $3 local.get $1 i32.store offset=12 local.get $0 @@ -1980,12 +1982,12 @@ br $for-loop|1 end end - local.get $2 - call $~lib/rt/pure/__release local.get $3 + call $~lib/rt/pure/__release + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end @@ -1993,30 +1995,30 @@ i32.const 1360 i32.const 1392 call $~lib/string/String.__concat - local.tee $3 + local.tee $2 i32.const 1456 call $~lib/string/String.__concat - local.get $3 + local.get $2 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 $2 + local.tee $1 i32.const 0 i32.store - local.get $2 i32.const 4 i32.const 7 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 local.tee $0 - local.get $2 + local.get $1 + local.tee $2 i32.load local.tee $4 i32.ne @@ -2027,61 +2029,66 @@ local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 i32.store - local.get $1 - local.tee $3 local.get $2 - local.tee $0 + local.set $0 + local.get $3 + local.tee $2 + local.get $0 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 $0 - local.get $3 + local.get $2 i32.store local.get $0 - local.tee $3 + local.set $2 local.get $1 + local.get $3 local.tee $0 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 $0 - local.get $3 - i32.store local.get $2 - local.tee $3 + i32.store + local.get $1 + local.set $2 + local.get $1 local.get $0 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 $0 - local.get $3 + local.get $2 i32.store local.get $1 - local.get $2 - local.tee $3 + local.set $2 + local.get $3 + local.get $1 i32.load local.tee $4 i32.ne @@ -2092,28 +2099,28 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $3 + local.get $2 local.get $0 i32.store - local.get $2 local.get $1 + local.get $3 i32.load local.tee $0 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $0 call $~lib/rt/pure/__release end - local.get $1 local.get $3 - i32.store local.get $2 - call $~lib/rt/pure/__release + i32.store local.get $1 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) (func $~start diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 3e604862a1..db8dcdcc7e 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -159,15 +159,16 @@ (func $retain-release/assignField (local $0 i32) (local $1 i32) - global.get $retain-release/REF - local.tee $0 + (local $2 i32) global.get $retain-release/TARGET - local.tee $1 + local.tee $0 + global.get $retain-release/REF + local.tee $2 + local.get $0 i32.load i32.ne drop - local.get $1 - local.get $0 + local.get $2 i32.store ) (func $retain-release/scopeForComplex (param $0 i32) @@ -181,6 +182,10 @@ loop $for-loop|1 local.get $0 if + block $for-continue|1 + local.get $0 + br_if $for-continue|1 + end local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 63530bad3b..d433725220 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -85,23 +85,21 @@ ) (func $rt/instanceof/Animal#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 3 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $rt/instanceof/Cat#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 4 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 call $rt/instanceof/Animal#constructor ) (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 0dd0696483..9c9b4de434 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -135,16 +135,16 @@ local.set $2 local.get $0 if - local.get $1 + local.get $3 i32.load16_u local.tee $0 - local.get $3 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $0 local.get $4 + local.get $0 i32.sub return end diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index c642465f15..0db0594b51 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -48,9 +48,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_s ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index aee801a0b3..8aff379fe7 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -3,11 +3,9 @@ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result 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_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $none_=>_none (func)) @@ -19,6 +17,8 @@ (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))) @@ -238,7 +238,6 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/i (mut i32) (i32.const 0)) - (global $~argumentsLength (mut i32) (i32.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) @@ -1765,7 +1764,6 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/tlsf/__alloc @@ -1773,27 +1771,28 @@ local.get $0 local.get $1 i32.shl - local.tee $4 - local.set $6 - local.get $4 + local.tee $1 + local.set $5 + local.get $1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $4 local.get $3 if - local.get $1 + local.get $4 local.get $3 - local.get $6 + local.get $5 call $~lib/memory/memory.copy end - local.get $1 + local.get $4 + local.tee $3 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $1 + local.get $3 i32.store offset=4 local.get $2 - local.get $4 + local.get $1 i32.store offset=8 local.get $2 local.get $0 @@ -1880,9 +1879,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_u ) @@ -2967,8 +2966,7 @@ i32.eqz ) (func $~setArgumentsLength (param $0 i32) - local.get $0 - global.set $~argumentsLength + nop ) (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2989,8 +2987,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3065,8 +3061,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3142,8 +3136,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3219,8 +3211,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3415,8 +3405,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $2 i32.const 2 i32.shl @@ -3498,10 +3486,7 @@ i32.shl i32.add i32.load - local.set $3 - i32.const 3 - global.set $~argumentsLength - local.get $3 + local.tee $3 local.get $2 local.get $0 local.get $1 @@ -3577,8 +3562,6 @@ select i32.lt_s if - i32.const 4 - global.set $~argumentsLength local.get $2 local.get $0 i32.load offset=4 @@ -3645,8 +3628,6 @@ i32.const 0 i32.ge_s if - i32.const 4 - global.set $~argumentsLength local.get $2 local.get $0 i32.load offset=4 @@ -3767,92 +3748,13 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f32) + (local $4 f32) + (local $5 i32) (local $6 f32) (local $7 i32) - loop $for-loop|0 - local.get $7 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $7 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $4 - loop $while-continue|1 - local.get $4 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - 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 $4 - local.tee $3 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $5 - f32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $4 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - f32.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 i32) - (local $7 f32) - (local $8 i32) local.get $1 i32.const 31 i32.add @@ -3860,37 +3762,37 @@ i32.shr_u i32.const 2 i32.shl - local.tee $3 + local.tee $2 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $6 + 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_u i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 i32.const 1 i32.shr_s i32.const 31 @@ -3900,93 +3802,88 @@ 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.tee $4 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f32_f32_=>_i32) + local.tee $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_u 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 @@ -3994,12 +3891,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_u @@ -4017,11 +3914,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 @@ -4033,32 +3930,27 @@ if local.get $0 f32.load - local.set $5 + local.tee $4 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f32_f32_=>_i32) + local.tee $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_u 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 @@ -4072,10 +3964,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 @@ -4085,26 +3977,26 @@ 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 call $~lib/rt/tlsf/maybeInitialize - local.get $6 + 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 (param $0 f32) (param $1 f32) (result i32) @@ -4136,171 +4028,13 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 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 - 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 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + (local $4 f64) + (local $5 i32) (local $6 f64) (local $7 i32) - loop $for-loop|0 - local.get $7 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $7 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $4 - loop $while-continue|1 - local.get $4 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - 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 $4 - local.tee $3 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $4 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) - (local $7 f64) - (local $8 i32) local.get $1 i32.const 31 i32.add @@ -4308,37 +4042,37 @@ i32.shr_u i32.const 2 i32.shl - local.tee $3 + local.tee $2 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $6 + 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_u i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 i32.const 1 i32.shr_s i32.const 31 @@ -4348,93 +4082,88 @@ 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.tee $4 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f64_f64_=>_i32) + local.tee $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_u 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 @@ -4442,12 +4171,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_u @@ -4465,11 +4194,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 @@ -4481,32 +4210,27 @@ if local.get $0 f64.load - local.set $5 + local.tee $4 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f64_f64_=>_i32) + local.tee $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_u 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 @@ -4520,10 +4244,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 @@ -4533,26 +4257,26 @@ 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 call $~lib/rt/tlsf/maybeInitialize - local.get $6 + 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 (param $0 f64) (param $1 f64) (result i32) @@ -4584,85 +4308,6 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (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 (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 @@ -4712,17 +4357,14 @@ i32.ge_s if block $while-break|1 + local.get $6 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $5 + local.tee $5 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4833,18 +4475,14 @@ i32.shl i32.add i32.load - local.set $3 + local.tee $3 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $6 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4950,18 +4588,14 @@ if local.get $0 i32.load - local.set $3 + local.tee $3 local.get $0 local.get $1 i32.const 2 i32.shl i32.add i32.load - local.set $6 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $6 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5047,14 +4681,10 @@ if local.get $4 i32.load offset=4 - local.set $3 + local.tee $3 local.get $4 i32.load - local.set $2 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $2 + local.tee $2 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5219,8 +4849,6 @@ local.get $4 i32.lt_s if - i32.const 2 - global.set $~argumentsLength i32.const 0 local.get $0 local.get $2 @@ -5291,6 +4919,7 @@ i32.store offset=12 end local.get $2 + local.tee $3 local.get $0 i32.load offset=4 local.get $1 @@ -5303,7 +4932,7 @@ i32.ne if local.get $0 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $1 @@ -5425,14 +5054,10 @@ if local.get $3 i32.load offset=4 - local.set $2 + local.tee $2 local.get $3 i32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $2 - local.get $4 + local.tee $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5477,8 +5102,6 @@ local.get $6 i32.lt_s if - i32.const 2 - global.set $~argumentsLength local.get $0 local.get $2 i32.const 1 @@ -5755,90 +5378,6 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (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 - block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) - i32.const 1 - local.set $1 - local.get $0 - local.get $2 - 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 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 887 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -5936,155 +5475,79 @@ local.get $1 end ) - (func $std/array/createRandomStringArray (result i32) - (local $0 i32) + (func $std/array/createRandomString (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) - i32.const 1600 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 1600 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $2 - local.get $0 - local.get $4 - i32.load - local.tee $3 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $4 - local.get $2 - i32.store - local.get $4 - local.get $0 - i32.store offset=4 - local.get $4 - i32.const 1600 - i32.store offset=8 - local.get $4 - i32.const 400 - i32.store offset=12 + i32.const 6064 + local.set $1 loop $for-loop|0 - local.get $1 - i32.const 400 + local.get $5 + local.get $0 i32.lt_s if local.get $1 - local.set $3 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - local.set $6 - i32.const 0 - local.set $5 - i32.const 6064 - local.set $0 - loop $for-loop|00 - local.get $5 - local.get $6 - i32.lt_s - if - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 6064 - call $~lib/math/NativeMath.random - i32.const 5088 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $2 - i32.const 5088 - 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 $1 - local.get $2 - i32.const 1 - i32.shl - i32.const 5088 - i32.add - i32.load16_u - i32.store16 - local.get $1 - call $~lib/rt/pure/__retain - end - local.set $2 - local.get $0 - local.tee $1 - local.get $2 - call $~lib/string/String.__concat - local.tee $7 - local.tee $0 - local.get $1 - 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 $2 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|00 - end + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 6064 + call $~lib/math/NativeMath.random + i32.const 5088 + call $~lib/string/String#get:length + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $3 + i32.const 5088 + 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 $3 + i32.const 1 + i32.shl + i32.const 5088 + i32.add + i32.load16_u + i32.store16 + local.get $2 + call $~lib/rt/pure/__retain end + local.tee $6 + call $~lib/string/String.__concat + local.tee $4 + local.set $2 + local.get $1 + local.tee $3 local.get $4 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $2 + local.set $1 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $4 + call $~lib/rt/pure/__release + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|0 end end - local.get $4 + local.get $1 ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8182,6 +7645,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8189,7 +7653,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -8676,13 +8139,14 @@ local.get $3 i32.eqz if - local.get $0 - i64.load - local.tee $4 - i64.eqz - if (result i32) + block $__inlined_func$~lib/util/number/utoa64 (result i32) i32.const 6416 - else + 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 @@ -8885,13 +8349,14 @@ local.get $4 i32.eqz if - local.get $0 - i64.load - local.tee $3 - i64.eqz - if (result i32) + block $__inlined_func$~lib/util/number/itoa64 (result i32) i32.const 6416 - else + local.get $0 + i64.load + local.tee $3 + i64.eqz + br_if $__inlined_func$~lib/util/number/itoa64 + drop local.get $3 i64.const 63 i64.shr_u @@ -10100,25 +9565,25 @@ (local $26 i32) (local $27 i32) (local $28 i32) - (local $29 i32) - (local $30 i32) + (local $29 f64) + (local $30 f32) (local $31 i32) (local $32 i32) (local $33 i32) (local $34 i32) (local $35 i32) - (local $36 f64) + (local $36 i32) (local $37 i32) (local $38 i32) (local $39 i32) (local $40 i32) - (local $41 f32) - (local $42 i32) + (local $41 i32) + (local $42 f64) (local $43 i32) (local $44 i32) (local $45 i32) (local $46 i32) - (local $47 i32) + (local $47 f32) (local $48 i32) (local $49 i32) (local $50 i32) @@ -10131,6 +9596,8 @@ (local $57 i32) (local $58 i32) (local $59 i32) + (local $60 i32) + (local $61 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -10140,52 +9607,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $58 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $59 + local.get $58 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $58 end - local.get $59 + local.get $58 i32.const 0 i32.store - local.get $59 + local.get $58 i32.const 0 i32.store offset=4 - local.get $59 + local.get $58 i32.const 0 i32.store offset=8 - local.get $0 - local.tee $1 - local.get $59 + local.get $1 + local.tee $0 + local.get $58 i32.load - local.tee $56 + local.tee $59 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $56 + local.set $0 + local.get $59 call $~lib/rt/pure/__release end - local.get $59 - local.get $1 - i32.store - local.get $59 + local.get $58 local.get $0 + i32.store + local.get $58 + local.get $1 i32.store offset=4 - local.get $59 + local.get $58 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -10199,7 +9666,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $59 + local.get $58 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -10207,20 +9674,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $57 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $60 call $std/array/isArraysEqual i32.eqz if @@ -10231,20 +9698,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $61 call $std/array/isArraysEqual i32.eqz if @@ -10255,20 +9722,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 call $std/array/isArraysEqual i32.eqz if @@ -10279,20 +9746,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -10303,20 +9770,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -10327,17 +9794,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 call $~lib/rt/pure/__release - local.get $0 + local.get $60 call $~lib/rt/pure/__release - local.get $59 + local.get $61 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $56 + local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10345,20 +9812,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $57 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10370,20 +9837,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10395,20 +9862,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10420,20 +9887,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10445,20 +9912,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10470,17 +9937,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $57 call $~lib/rt/pure/__release - local.get $0 + local.get $60 call $~lib/rt/pure/__release - local.get $59 + local.get $61 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $56 + local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10741,7 +10208,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $59 i32.load offset=4 local.tee $1 i32.const 0 @@ -10751,41 +10218,41 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $59 i32.load offset=12 - local.tee $59 + local.tee $1 i32.const 0 i32.gt_s if - local.get $0 - i32.load offset=4 - local.tee $1 local.get $59 + i32.load offset=4 + local.tee $0 + local.get $1 i32.const 2 i32.shl i32.add - local.set $59 + local.set $1 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 $59 + local.tee $0 + local.get $1 i32.lt_u br_if $do-continue|0 end else - local.get $0 + local.get $59 i32.const 0 call $~lib/array/ensureSize end - local.get $0 + local.get $59 i32.const 0 i32.store offset=12 - local.get $0 + local.get $59 i32.load offset=12 if i32.const 0 @@ -10795,15 +10262,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $59 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $0 + local.set $61 global.get $std/array/arr - local.get $0 + local.get $61 call $~lib/array/Array#concat - local.set $59 + local.set $0 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10828,7 +10295,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $0 i32.load offset=12 i32.const 3 i32.ne @@ -10840,14 +10307,14 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $0 i32.const 0 i32.const 2 i32.const 3 i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $1 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10862,7 +10329,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $0 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10875,7 +10342,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $0 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10888,7 +10355,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $0 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10901,17 +10368,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $61 i32.const 46 call $~lib/array/Array#push - local.get $0 + local.get $61 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $0 + local.get $61 call $~lib/array/Array#concat - local.set $1 - local.get $59 + local.set $60 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10925,7 +10392,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $61 i32.load offset=12 i32.const 2 i32.ne @@ -10937,7 +10404,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.load offset=12 i32.const 5 i32.ne @@ -10949,7 +10416,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10962,7 +10429,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10975,7 +10442,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10988,7 +10455,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -11001,7 +10468,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -11014,10 +10481,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 call $~lib/array/Array#pop drop - local.get $1 + local.get $60 i32.load offset=12 i32.const 4 i32.ne @@ -11048,10 +10515,10 @@ local.get $59 global.get $std/array/arr call $~lib/array/Array#concat - local.set $58 - local.get $1 + local.set $0 + local.get $60 call $~lib/rt/pure/__release - local.get $58 + local.get $0 i32.load offset=12 i32.const 3 i32.ne @@ -11073,11 +10540,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $61 call $~lib/rt/pure/__release - local.get $58 + local.get $0 call $~lib/rt/pure/__release - local.get $56 + local.get $1 call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release @@ -11092,14 +10559,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $59 + local.tee $39 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11125,14 +10592,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $56 + local.tee $37 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11150,14 +10617,15 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $1 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $42 + local.tee $55 i32.const 5 i32.const 2 i32.const 3 @@ -11182,9 +10650,9 @@ i32.const 2352 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 @@ -11196,7 +10664,7 @@ i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11214,9 +10682,9 @@ i32.const 2448 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 @@ -11228,7 +10696,7 @@ i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11246,21 +10714,21 @@ i32.const 2544 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 $48 + local.tee $49 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11278,21 +10746,21 @@ i32.const 2640 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 call $~lib/array/Array#copyWithin - local.tee $45 + local.tee $46 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11310,14 +10778,14 @@ i32.const 2736 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 call $~lib/array/Array#copyWithin - local.tee $31 + local.tee $44 i32.const 5 i32.const 2 i32.const 3 @@ -11342,21 +10810,21 @@ i32.const 2832 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 $47 + local.tee $58 i32.const 5 i32.const 2 i32.const 3 i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11374,21 +10842,21 @@ i32.const 2928 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 $39 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11406,22 +10874,22 @@ i32.const 3024 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 -1 call $~lib/array/Array#copyWithin - local.tee $37 + local.tee $61 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11439,22 +10907,22 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $40 local.get $0 + call $~lib/rt/pure/__release + local.get $40 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 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11466,26 +10934,28 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $40 call $~lib/rt/pure/__release - local.get $59 + local.get $39 call $~lib/rt/pure/__release - local.get $58 + local.get $38 call $~lib/rt/pure/__release - local.get $56 + local.get $37 call $~lib/rt/pure/__release - local.get $57 + local.get $36 call $~lib/rt/pure/__release - local.get $42 + local.get $55 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release local.get $52 call $~lib/rt/pure/__release - local.get $50 + local.get $51 call $~lib/rt/pure/__release local.get $53 call $~lib/rt/pure/__release + local.get $50 + call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 @@ -11496,25 +10966,23 @@ call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release - local.get $31 - call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $47 + local.get $58 call $~lib/rt/pure/__release - local.get $40 + local.get $56 call $~lib/rt/pure/__release - local.get $39 + local.get $57 call $~lib/rt/pure/__release - local.get $38 + local.get $60 call $~lib/rt/pure/__release - local.get $37 + local.get $61 call $~lib/rt/pure/__release - local.get $35 + local.get $59 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $34 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -11688,9 +11156,9 @@ unreachable end global.get $std/array/arr - local.tee $0 + local.tee $61 i32.load offset=12 - local.tee $59 + local.tee $1 i32.const 1 i32.lt_s if @@ -11701,29 +11169,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $61 i32.load offset=4 - local.tee $1 + local.tee $60 i32.load - local.get $1 - local.get $1 + local.get $60 + local.get $60 i32.const 4 i32.add - local.get $59 + local.get $1 i32.const 1 i32.sub - local.tee $59 + local.tee $0 i32.const 2 i32.shl - local.tee $56 + local.tee $1 call $~lib/memory/memory.copy local.get $1 - local.get $56 + local.get $60 i32.add i32.const 0 i32.store + local.get $61 local.get $0 - local.get $59 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11891,14 +11359,14 @@ unreachable end global.get $std/array/arr - local.tee $0 + local.tee $59 i32.load offset=12 local.tee $1 if - local.get $0 + local.get $59 i32.load offset=4 - local.set $59 - local.get $0 + local.set $0 + local.get $59 i32.load offset=4 local.get $1 i32.const 1 @@ -11906,30 +11374,30 @@ i32.const 2 i32.shl i32.add - local.set $1 + local.set $58 loop $while-continue|0 - local.get $59 - local.get $1 + local.get $0 + local.get $58 i32.lt_u if - local.get $59 + local.get $0 i32.load - local.set $58 - local.get $59 - local.get $1 + local.set $1 + local.get $0 + local.get $58 i32.load i32.store - local.get $1 local.get $58 + local.get $1 i32.store - local.get $59 + local.get $0 i32.const 4 i32.add - local.set $59 - local.get $1 + local.set $0 + local.get $58 i32.const 4 i32.sub - local.set $1 + local.set $58 br $while-continue|0 end end @@ -12167,36 +11635,36 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $56 - i32.const 0 + local.tee $57 local.set $1 + i32.const 0 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $57 i32.load offset=12 - local.tee $59 + local.tee $61 if (result i32) i32.const 0 - local.get $59 + local.get $61 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $1 + local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $56 + local.get $1 i32.load offset=4 - local.set $58 + local.set $1 loop $while-continue|022 - local.get $1 - local.get $59 + local.get $0 + local.get $61 i32.lt_s if - local.get $58 local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -12204,17 +11672,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|022 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -12231,36 +11699,36 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 - local.set $57 - i32.const 0 + local.tee $60 local.set $1 + i32.const 0 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $59 + local.get $60 i32.load offset=12 - local.tee $58 + local.tee $61 if (result i32) i32.const 0 - local.get $58 + local.get $61 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $1 + local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $57 + local.get $1 i32.load offset=4 - local.set $56 + local.set $1 loop $while-continue|023 - local.get $1 - local.get $58 + local.get $0 + local.get $61 i32.lt_s if - local.get $56 local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -12268,17 +11736,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|023 end end i32.const -1 - local.set $1 + local.set $0 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -12289,9 +11757,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $57 call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -12431,7 +11899,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $59 + local.set $0 i32.const 0 i32.const 1 i32.const 2 @@ -12439,49 +11907,49 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $60 i32.load offset=12 - local.tee $58 + local.tee $61 if (result i32) i32.const 0 - local.get $58 + local.get $61 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $60 i32.load offset=4 - local.set $57 + local.set $1 loop $while-continue|024 - local.get $59 - local.get $58 + local.get $0 + local.get $61 i32.lt_s if i32.const 1 - local.get $57 - local.get $59 + local.get $1 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $41 + local.tee $47 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $41 - local.get $41 + local.get $47 + local.get $47 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $59 + local.get $0 i32.const 1 i32.add - local.set $59 + local.set $0 br $while-continue|024 end end @@ -12498,7 +11966,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $59 + local.set $58 i32.const 0 i32.const 1 i32.const 3 @@ -12506,49 +11974,49 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $61 i32.load offset=12 - local.tee $56 + local.tee $59 if (result i32) i32.const 0 - local.get $56 + local.get $59 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $58 + local.get $61 i32.load offset=4 - local.set $42 + local.set $1 loop $while-continue|025 + local.get $58 local.get $59 - local.get $56 i32.lt_s if i32.const 1 - local.get $42 - local.get $59 + local.get $1 + local.get $58 i32.const 3 i32.shl i32.add f64.load - local.tee $36 + local.tee $42 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $36 - local.get $36 + local.get $42 + local.get $42 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $59 + local.get $58 i32.const 1 i32.add - local.set $59 + local.set $58 br $while-continue|025 end end @@ -12618,9 +12086,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $60 call $~lib/rt/pure/__release - local.get $58 + local.get $61 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12628,18 +12096,18 @@ i32.const 3344 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 $57 + local.tee $23 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12651,14 +12119,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12676,21 +12144,21 @@ i32.const 3456 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 0 i32.const 0 call $~lib/array/Array#splice - local.tee $50 + 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 $53 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12702,14 +12170,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 $49 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12727,21 +12195,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.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $48 + local.tee $17 i32.const 3 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12753,14 +12221,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12778,21 +12246,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 2 i32.const 2 call $~lib/array/Array#splice - local.tee $44 + local.tee $14 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12804,14 +12272,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12829,20 +12297,20 @@ i32.const 3792 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 $40 + local.tee $11 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12854,14 +12322,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12879,20 +12347,20 @@ i32.const 3904 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 $37 + local.tee $8 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12904,14 +12372,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12929,20 +12397,20 @@ i32.const 4016 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 $30 + local.tee $5 i32.const 2 i32.const 2 i32.const 3 i32.const 4064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12954,14 +12422,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 4096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12979,20 +12447,20 @@ i32.const 4128 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 $33 + local.tee $2 i32.const 1 i32.const 2 i32.const 3 i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $34 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13004,14 +12472,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13029,20 +12497,20 @@ i32.const 4240 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 $26 + local.tee $40 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13054,14 +12522,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13079,20 +12547,20 @@ i32.const 4352 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 $23 + local.tee $37 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13104,14 +12572,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $55 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13129,20 +12597,20 @@ i32.const 4464 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 $20 + local.tee $54 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13154,14 +12622,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13179,20 +12647,21 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - 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 0 call $~lib/array/Array#splice - local.tee $17 + local.tee $53 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13211,7 +12680,7 @@ i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13236,14 +12705,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $14 + local.tee $48 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13262,7 +12731,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13280,21 +12749,21 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 + local.set $28 local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $28 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $11 + local.tee $44 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13306,14 +12775,14 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $28 i32.const 5 i32.const 2 i32.const 3 i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13331,10 +12800,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $0 i32.const 1 call $~lib/array/Array#splice - local.tee $56 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -13344,7 +12813,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.load offset=12 if i32.const 0 @@ -13360,37 +12829,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $35 i32.load offset=4 - local.tee $1 + local.tee $59 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $59 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $59 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $1 + local.get $59 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $1 + local.get $59 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $58 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $35 i32.const 2 call $~lib/array/Array#splice - local.set $42 - local.get $56 + local.set $31 + local.get $1 call $~lib/rt/pure/__release - local.get $42 + local.get $31 i32.load offset=12 i32.const 2 i32.ne @@ -13402,10 +12871,10 @@ call $~lib/builtins/abort unreachable end - local.get $42 + local.get $31 i32.const 0 call $~lib/array/Array#__get - local.tee $8 + local.tee $56 i32.load i32.const 3 i32.ne @@ -13417,10 +12886,10 @@ call $~lib/builtins/abort unreachable end - local.get $42 + local.get $31 i32.const 1 call $~lib/array/Array#__get - local.tee $7 + local.tee $57 i32.load i32.const 4 i32.ne @@ -13432,7 +12901,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $35 i32.load offset=12 i32.const 3 i32.ne @@ -13444,10 +12913,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $35 i32.const 0 call $~lib/array/Array#__get - local.tee $6 + local.tee $60 i32.load i32.const 1 i32.ne @@ -13459,10 +12928,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $35 i32.const 1 call $~lib/array/Array#__get - local.tee $5 + local.tee $61 i32.load i32.const 2 i32.ne @@ -13474,10 +12943,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $35 i32.const 2 call $~lib/array/Array#__get - local.tee $4 + local.tee $59 i32.load i32.const 5 i32.ne @@ -13495,7 +12964,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $32 i32.load offset=4 local.tee $1 i32.const 1 @@ -13508,9 +12977,9 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $56 + local.get $32 call $~lib/array/Array#splice - local.tee $31 + local.tee $27 i32.load offset=12 i32.const 1 i32.ne @@ -13522,11 +12991,11 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $27 i32.const 0 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $26 + local.get $26 i32.eqz if i32.const 0 @@ -13547,7 +13016,7 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $32 i32.load offset=12 i32.const 2 i32.ne @@ -13559,10 +13028,10 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $32 i32.const 0 call $~lib/array/Array#__get - local.tee $3 + local.tee $0 if i32.const 0 i32.const 1296 @@ -13571,11 +13040,11 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $32 i32.const 1 call $~lib/array/Array#__get - local.tee $58 - local.get $58 + local.tee $25 + local.get $25 i32.eqz if i32.const 0 @@ -13596,107 +13065,107 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $28 call $~lib/rt/pure/__release - local.get $57 + local.get $23 call $~lib/rt/pure/__release - local.get $54 + local.get $22 call $~lib/rt/pure/__release - local.get $52 + local.get $21 call $~lib/rt/pure/__release - local.get $50 + local.get $20 call $~lib/rt/pure/__release - local.get $53 + local.get $19 call $~lib/rt/pure/__release - local.get $49 + local.get $18 call $~lib/rt/pure/__release - local.get $48 + local.get $17 call $~lib/rt/pure/__release - local.get $46 + local.get $16 call $~lib/rt/pure/__release - local.get $45 + local.get $15 call $~lib/rt/pure/__release - local.get $44 + local.get $14 call $~lib/rt/pure/__release - local.get $43 + local.get $13 call $~lib/rt/pure/__release - local.get $47 + local.get $12 call $~lib/rt/pure/__release - local.get $40 + local.get $11 call $~lib/rt/pure/__release - local.get $39 + local.get $10 call $~lib/rt/pure/__release - local.get $38 + local.get $9 call $~lib/rt/pure/__release - local.get $37 + local.get $8 call $~lib/rt/pure/__release - local.get $35 + local.get $7 call $~lib/rt/pure/__release - local.get $34 + local.get $6 call $~lib/rt/pure/__release - local.get $30 + local.get $5 call $~lib/rt/pure/__release - local.get $29 + local.get $4 call $~lib/rt/pure/__release - local.get $28 + local.get $3 call $~lib/rt/pure/__release - local.get $33 + local.get $2 call $~lib/rt/pure/__release - local.get $32 + local.get $34 call $~lib/rt/pure/__release - local.get $27 + local.get $33 call $~lib/rt/pure/__release - local.get $26 + local.get $40 call $~lib/rt/pure/__release - local.get $25 + local.get $39 call $~lib/rt/pure/__release - local.get $24 + local.get $38 call $~lib/rt/pure/__release - local.get $23 + local.get $37 call $~lib/rt/pure/__release - local.get $22 + local.get $36 call $~lib/rt/pure/__release - local.get $21 + local.get $55 call $~lib/rt/pure/__release - local.get $20 + local.get $54 call $~lib/rt/pure/__release - local.get $19 + local.get $52 call $~lib/rt/pure/__release - local.get $18 + local.get $51 call $~lib/rt/pure/__release - local.get $17 + local.get $53 call $~lib/rt/pure/__release - local.get $16 + local.get $50 call $~lib/rt/pure/__release - local.get $15 + local.get $49 call $~lib/rt/pure/__release - local.get $14 + local.get $48 call $~lib/rt/pure/__release - local.get $13 + local.get $46 call $~lib/rt/pure/__release - local.get $12 + local.get $45 call $~lib/rt/pure/__release - local.get $11 + local.get $44 call $~lib/rt/pure/__release - local.get $10 + local.get $43 call $~lib/rt/pure/__release - local.get $9 + local.get $58 call $~lib/rt/pure/__release - local.get $8 + local.get $56 call $~lib/rt/pure/__release - local.get $7 + local.get $57 call $~lib/rt/pure/__release - local.get $6 + local.get $60 call $~lib/rt/pure/__release - local.get $5 + local.get $61 call $~lib/rt/pure/__release - local.get $4 + local.get $59 call $~lib/rt/pure/__release - local.get $1 + local.get $26 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $25 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -14170,17 +13639,17 @@ unreachable end loop $for-loop|0 - local.get $55 + local.get $24 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $55 + local.get $24 i32.const 1 i32.add - local.set $55 + local.set $24 br $for-loop|0 end end @@ -14197,56 +13666,54 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $59 + local.set $58 global.get $std/array/arr - local.tee $58 + local.tee $61 i32.load offset=12 - local.tee $57 + local.tee $59 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $60 i32.load offset=4 - local.set $55 + local.set $0 loop $for-loop|043 - local.get $59 - local.get $57 local.get $58 + local.get $59 + local.get $61 i32.load offset=12 - local.tee $54 - local.get $57 - local.get $54 + local.tee $1 + local.get $59 + local.get $1 i32.lt_s select i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $59 + local.get $58 i32.const 2 i32.shl - local.tee $54 - local.get $58 + local.tee $1 + local.get $61 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $41 - local.get $54 - local.get $55 + local.set $47 + local.get $0 + local.get $1 i32.add - local.get $41 + local.get $47 f32.store - local.get $59 + local.get $58 i32.const 1 i32.add - local.set $59 + local.set $58 br $for-loop|043 end end - local.get $1 + local.get $60 i32.load offset=12 i32.const 4 i32.ne @@ -14258,7 +13725,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $60 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -14367,7 +13834,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $1 + local.get $60 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 @@ -14786,17 +14253,132 @@ call $~lib/bindings/Math/random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $59 - i32.const 0 - global.set $~argumentsLength - local.get $59 - call $~lib/array/Array#sort|trampoline + block $__inlined_func$~lib/array/Array#sort (result i32) + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 5280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $55 + i32.load offset=12 + local.tee $59 + i32.const 1 + i32.le_s + if + local.get $55 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $55 + i32.load offset=4 + local.set $61 + local.get $59 + i32.const 2 + i32.eq + if + local.get $61 + f32.load offset=4 + local.tee $30 + local.get $61 + f32.load + local.tee $47 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $61 + local.get $47 + f32.store offset=4 + local.get $61 + local.get $30 + f32.store + end + local.get $55 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $59 + i32.const 256 + i32.lt_s + if + i32.const 0 + local.set $60 + loop $for-loop|00 + local.get $60 + local.get $59 + i32.lt_s + if + local.get $61 + local.get $60 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $30 + local.get $60 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|1 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $30 + local.get $61 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $47 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $61 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $47 + f32.store + br $while-continue|1 + end + end + end + local.get $61 + local.get $0 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $30 + f32.store + local.get $60 + i32.const 1 + i32.add + local.set $60 + br $for-loop|00 + end + end + else + local.get $61 + local.get $59 + call $~lib/util/sort/weakHeapSort + end + local.get $55 + call $~lib/rt/pure/__retain + end call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14805,41 +14387,41 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $51 i32.const 0 - local.set $1 + local.set $58 i32.const 0 - local.get $59 + local.get $55 i32.load offset=12 - local.tee $55 - local.get $57 + local.tee $1 + local.get $51 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $57 - local.get $59 + local.get $51 + local.get $55 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|00 + loop $for-loop|001 + local.get $58 local.get $1 - local.get $55 i32.lt_s if - local.get $59 - local.get $1 + local.get $55 + local.get $58 call $~lib/array/Array#__get - local.tee $41 - local.get $41 + local.tee $47 + local.get $47 f32.ne if (result i32) - local.get $57 - local.get $1 + local.get $51 + local.get $58 call $~lib/array/Array#__get - local.tee $41 - local.get $41 + local.tee $47 + local.get $47 f32.ne else i32.const 0 @@ -14847,21 +14429,21 @@ i32.eqz if i32.const 0 - local.get $59 - local.get $1 + local.get $55 + local.get $58 call $~lib/array/Array#__get - local.get $57 - local.get $1 + local.get $51 + local.get $58 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $1 + local.get $58 i32.const 1 i32.add - local.set $1 - br $for-loop|00 + local.set $58 + br $for-loop|001 end end i32.const 1 @@ -14875,17 +14457,132 @@ call $~lib/builtins/abort unreachable end - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 5376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $58 - i32.const 0 - global.set $~argumentsLength - local.get $58 - call $~lib/array/Array#sort|trampoline + block $__inlined_func$~lib/array/Array#sort (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 5376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $54 + i32.load offset=12 + local.tee $59 + i32.const 1 + i32.le_s + if + local.get $54 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $54 + i32.load offset=4 + local.set $61 + local.get $59 + i32.const 2 + i32.eq + if + local.get $61 + f64.load offset=8 + local.tee $29 + local.get $61 + f64.load + local.tee $42 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $61 + local.get $42 + f64.store offset=8 + local.get $61 + local.get $29 + f64.store + end + local.get $54 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $59 + i32.const 256 + i32.lt_s + if + i32.const 0 + local.set $60 + loop $for-loop|02 + local.get $60 + local.get $59 + i32.lt_s + if + local.get $61 + local.get $60 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $29 + local.get $60 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|13 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $29 + local.get $61 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $42 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $61 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $42 + f64.store + br $while-continue|13 + end + end + end + local.get $61 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $29 + f64.store + local.get $60 + i32.const 1 + i32.add + local.set $60 + br $for-loop|02 + end + end + else + local.get $61 + local.get $59 + call $~lib/util/sort/weakHeapSort + end + local.get $54 + call $~lib/rt/pure/__retain + end call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14894,41 +14591,41 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $55 + local.set $53 i32.const 0 - local.set $1 + local.set $60 i32.const 0 - local.get $58 + local.get $54 i32.load offset=12 - local.tee $52 - local.get $55 + local.tee $1 + local.get $53 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $55 - local.get $58 + local.get $53 + local.get $54 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 + local.get $60 local.get $1 - local.get $52 i32.lt_s if - local.get $58 - local.get $1 + local.get $54 + local.get $60 call $~lib/array/Array#__get - local.tee $36 - local.get $36 + local.tee $42 + local.get $42 f64.ne if (result i32) - local.get $55 - local.get $1 + local.get $53 + local.get $60 call $~lib/array/Array#__get - local.tee $36 - local.get $36 + local.tee $42 + local.get $42 f64.ne else i32.const 0 @@ -14936,20 +14633,20 @@ i32.eqz if i32.const 0 - local.get $58 - local.get $1 + local.get $54 + local.get $60 call $~lib/array/Array#__get - local.get $55 - local.get $1 + local.get $53 + local.get $60 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $1 + local.get $60 i32.const 1 i32.add - local.set $1 + local.set $60 br $for-loop|01 end end @@ -14970,21 +14667,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $54 - i32.const 0 - global.set $~argumentsLength - local.get $54 + local.tee $58 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $54 + local.get $58 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15002,21 +14696,18 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 - i32.const 0 - global.set $~argumentsLength - local.get $52 + local.tee $56 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $52 + local.get $56 i32.const 5 i32.const 2 i32.const 7 i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15034,7 +14725,7 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $43 + local.set $57 i32.const 1 i32.const 2 i32.const 3 @@ -15048,37 +14739,37 @@ i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $49 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $49 + local.set $48 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $52 i32.const 64 call $std/array/createReverseOrderedArray - local.set $48 + local.set $46 i32.const 128 call $std/array/createReverseOrderedArray - local.set $46 + local.set $45 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $45 + local.set $44 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $44 + local.set $43 i32.const 512 call $std/array/createRandomOrderedArray - local.set $47 - local.get $43 + local.set $60 + local.get $57 i32.const 48 call $std/array/assertSorted local.get $50 @@ -15091,7 +14782,7 @@ i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15103,17 +14794,17 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $49 i32.const 48 call $std/array/assertSorted - local.get $53 + local.get $49 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15125,11 +14816,11 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $48 i32.const 48 call $std/array/assertSorted - local.get $49 - local.get $1 + local.get $48 + local.get $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15141,11 +14832,11 @@ call $~lib/builtins/abort unreachable end - local.get $48 + local.get $46 i32.const 48 call $std/array/assertSorted - local.get $48 - local.get $1 + local.get $46 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15157,11 +14848,11 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $45 i32.const 48 call $std/array/assertSorted - local.get $46 - local.get $1 + local.get $45 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15173,11 +14864,11 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $44 i32.const 48 call $std/array/assertSorted - local.get $45 - local.get $1 + local.get $44 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15189,11 +14880,11 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $43 i32.const 48 call $std/array/assertSorted - local.get $44 - local.get $1 + local.get $43 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15205,70 +14896,70 @@ call $~lib/builtins/abort unreachable end - local.get $47 + local.get $60 i32.const 48 call $std/array/assertSorted - local.get $59 + local.get $55 call $~lib/rt/pure/__release - local.get $57 + local.get $51 call $~lib/rt/pure/__release - local.get $58 + local.get $54 call $~lib/rt/pure/__release - local.get $55 + local.get $53 call $~lib/rt/pure/__release - local.get $54 + local.get $58 call $~lib/rt/pure/__release - local.get $40 + local.get $61 call $~lib/rt/pure/__release - local.get $52 + local.get $56 call $~lib/rt/pure/__release - local.get $39 + local.get $59 call $~lib/rt/pure/__release - local.get $43 + local.get $57 call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $48 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 $47 + local.get $43 call $~lib/rt/pure/__release - local.get $38 + local.get $60 call $~lib/rt/pure/__release - local.get $37 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 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 $59 - local.get $1 + local.set $1 + 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 $59 + local.get $1 i32.const 51 call $std/array/assertSorted - local.get $59 + local.get $1 i32.const 52 call $std/array/assertSorted - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $1 call $~lib/rt/pure/__release call $std/array/createReverseOrderedNestedArray local.tee $1 @@ -15288,68 +14979,125 @@ i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 + local.set $56 i32.const 7 i32.const 2 i32.const 15 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 - i32.const 1 - global.set $~argumentsLength - local.get $59 - call $std/array/assertSorted<~lib/string/String | null>|trampoline + local.set $57 + block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) + i32.const 1 + local.set $58 + local.get $56 + i32.const 55 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $60 + local.set $61 + local.get $60 + i32.load offset=12 + local.set $1 + loop $for-loop|025 + local.get $58 + local.get $1 + i32.lt_s + if + local.get $61 + local.get $58 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $59 + local.get $61 + local.get $58 + call $~lib/array/Array#__get + local.tee $0 + call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 + i32.const 0 + i32.gt_s + if + local.get $59 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isSorted<~lib/string/String | null> + end + local.get $59 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $58 + i32.const 1 + i32.add + local.set $58 + br $for-loop|025 + end + end + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 887 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $60 + call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $1 + local.set $58 i32.const 0 - local.get $59 + local.get $56 i32.load offset=12 - local.tee $54 - local.get $58 + local.tee $1 + local.get $57 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $58 - local.get $59 + local.get $56 + local.get $57 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop - loop $for-loop|02 + loop $for-loop|03 + local.get $58 local.get $1 - local.get $54 i32.lt_s if - local.get $59 - local.get $1 + local.get $56 + local.get $58 call $~lib/array/Array#__get - local.tee $57 + local.tee $59 + local.get $57 local.get $58 - local.get $1 call $~lib/array/Array#__get - local.tee $55 + local.tee $0 call $~lib/string/String.__eq i32.eqz if - local.get $57 + local.get $59 call $~lib/rt/pure/__release - local.get $55 + local.get $0 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $57 + local.get $59 call $~lib/rt/pure/__release - local.get $55 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $58 i32.const 1 i32.add - local.set $1 - br $for-loop|02 + local.set $58 + br $for-loop|03 end end i32.const 1 @@ -15363,18 +15111,87 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray - local.set $1 - i32.const 1 - global.set $~argumentsLength + i32.const 0 + local.set $60 + i32.const 1600 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + i32.const 0 + i32.const 1600 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $61 + i32.const 0 + i32.store + local.get $61 + i32.const 0 + i32.store offset=4 + local.get $61 + i32.const 0 + i32.store offset=8 + local.get $61 + i32.const 0 + i32.store offset=12 + local.get $0 + local.tee $1 + local.get $61 + i32.load + local.tee $59 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $59 + call $~lib/rt/pure/__release + end + local.get $61 local.get $1 + i32.store + local.get $61 + local.get $0 + i32.store offset=4 + local.get $61 + i32.const 1600 + i32.store offset=8 + local.get $61 + i32.const 400 + i32.store offset=12 + loop $for-loop|09 + local.get $60 + i32.const 400 + i32.lt_s + if + local.get $61 + local.get $60 + 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 $60 + i32.const 1 + i32.add + local.set $60 + br $for-loop|09 + end + end + local.get $61 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $59 + local.get $56 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release - local.get $1 + local.get $61 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15382,13 +15199,12 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $53 i32.load offset=4 - local.get $1 + local.get $53 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $59 - local.get $59 + local.tee $46 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15406,10 +15222,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $45 i32.const 6064 call $~lib/array/Array#join - local.tee $52 + local.tee $44 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15427,10 +15243,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $43 i32.const 6512 call $~lib/array/Array#join - local.tee $53 + local.tee $58 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15448,10 +15264,10 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $56 i32.const 6576 call $~lib/array/Array#join - local.tee $48 + local.tee $57 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15469,14 +15285,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $50 i32.load offset=4 - local.get $59 + local.get $50 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $58 - local.set $46 - local.get $58 + local.tee $60 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15494,10 +15308,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $61 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $44 + local.tee $59 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15515,22 +15329,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $49 i32.load offset=4 - local.tee $57 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $57 + local.get $1 i32.const 0 i32.store offset=4 - local.get $57 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $58 + local.get $49 call $~lib/array/Array#join - local.tee $43 + local.tee $0 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15548,19 +15362,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $48 i32.load offset=4 - local.tee $47 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $47 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $57 + local.get $48 call $~lib/array/Array#join - local.tee $47 + local.tee $1 i32.const 8176 call $~lib/string/String.__eq i32.eqz @@ -15572,36 +15386,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $53 call $~lib/rt/pure/__release + local.get $46 call $~lib/rt/pure/__release - local.get $54 + local.get $45 call $~lib/rt/pure/__release - local.get $52 + local.get $44 call $~lib/rt/pure/__release - local.get $50 + local.get $43 call $~lib/rt/pure/__release - local.get $53 + local.get $58 call $~lib/rt/pure/__release - local.get $49 + local.get $56 call $~lib/rt/pure/__release - local.get $48 + local.get $57 call $~lib/rt/pure/__release - local.get $59 + local.get $50 call $~lib/rt/pure/__release - local.get $46 + local.get $60 call $~lib/rt/pure/__release - local.get $45 + local.get $61 call $~lib/rt/pure/__release - local.get $44 + local.get $59 call $~lib/rt/pure/__release - local.get $58 + local.get $49 call $~lib/rt/pure/__release - local.get $43 + local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $48 call $~lib/rt/pure/__release - local.get $47 + local.get $1 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15609,29 +15424,29 @@ i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $39 i32.const 1 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $55 + local.set $38 i32.const 2 i32.const 2 i32.const 3 i32.const 8304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $54 + local.set $37 i32.const 4 i32.const 2 i32.const 3 i32.const 8336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 - local.get $57 + local.set $36 + local.get $39 i32.const 6304 call $~lib/array/Array#join local.tee $1 @@ -15647,11 +15462,11 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $38 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $45 + local.set $50 local.get $1 i32.const 7984 call $~lib/string/String.__eq @@ -15664,11 +15479,11 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $37 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $44 + local.set $49 local.get $1 i32.const 8368 call $~lib/string/String.__eq @@ -15681,11 +15496,11 @@ call $~lib/builtins/abort unreachable end - local.get $52 + local.get $36 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $43 + local.set $48 local.get $1 i32.const 8400 call $~lib/string/String.__eq @@ -15704,13 +15519,13 @@ i32.const 8432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $55 i32.load offset=4 - local.get $50 + local.get $55 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $47 + local.set $46 local.get $1 i32.const 8464 call $~lib/string/String.__eq @@ -15729,13 +15544,13 @@ i32.const 8496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $54 i32.load offset=4 - local.get $53 + local.get $54 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $40 + local.set $45 local.get $1 i32.const 8528 call $~lib/string/String.__eq @@ -15754,13 +15569,13 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $52 i32.load offset=4 - local.get $49 + local.get $52 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $39 + local.set $44 local.get $1 i32.const 8624 call $~lib/string/String.__eq @@ -15779,13 +15594,13 @@ i32.const 8688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $51 i32.load offset=4 - local.get $48 + local.get $51 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $38 + local.set $43 local.get $1 i32.const 8736 call $~lib/string/String.__eq @@ -15804,11 +15619,11 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $58 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $35 + local.set $56 local.get $1 i32.const 8896 call $~lib/string/String.__eq @@ -15827,11 +15642,11 @@ i32.const 9008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $57 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $30 + local.set $60 local.get $1 i32.const 9040 call $~lib/string/String.__eq @@ -15850,9 +15665,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $34 i32.load offset=4 - local.tee $59 + local.tee $1 i32.const 2 i32.const 2 i32.const 3 @@ -15860,7 +15675,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $59 + local.get $1 i32.const 2 i32.const 2 i32.const 3 @@ -15868,14 +15683,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $34 i32.load offset=4 - local.get $1 + local.get $34 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $59 - local.set $29 - local.get $59 + local.tee $1 + local.set $61 + local.get $1 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15893,9 +15708,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $33 i32.load offset=4 - local.tee $58 + local.tee $1 i32.const 2 i32.const 0 i32.const 6 @@ -15903,7 +15718,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $58 + local.get $1 i32.const 2 i32.const 0 i32.const 6 @@ -15911,14 +15726,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $59 + local.get $33 i32.load offset=4 - local.get $59 + local.get $33 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $58 - local.set $28 - local.get $58 + local.tee $1 + local.set $59 + local.get $1 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15936,7 +15751,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $40 i32.load offset=4 i32.const 1 i32.const 2 @@ -15944,7 +15759,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $1 i32.load offset=4 i32.const 1 i32.const 2 @@ -15953,16 +15768,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $32 + local.get $1 i32.store - local.get $58 + local.get $40 i32.load offset=4 - local.get $58 + local.get $40 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $33 - local.set $32 - local.get $33 + local.tee $0 + local.set $1 + local.get $0 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15974,50 +15789,50 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $39 call $~lib/rt/pure/__release - local.get $55 + local.get $38 call $~lib/rt/pure/__release - local.get $54 + local.get $37 call $~lib/rt/pure/__release - local.get $52 + local.get $36 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $45 + local.get $50 call $~lib/rt/pure/__release - local.get $44 + local.get $49 call $~lib/rt/pure/__release - local.get $43 + local.get $48 call $~lib/rt/pure/__release - local.get $50 + local.get $55 call $~lib/rt/pure/__release - local.get $47 + local.get $46 call $~lib/rt/pure/__release - local.get $53 + local.get $54 call $~lib/rt/pure/__release - local.get $40 + local.get $45 call $~lib/rt/pure/__release - local.get $49 + local.get $52 call $~lib/rt/pure/__release - local.get $39 + local.get $44 call $~lib/rt/pure/__release - local.get $48 + local.get $51 call $~lib/rt/pure/__release - local.get $38 + local.get $43 call $~lib/rt/pure/__release - local.get $37 + local.get $58 call $~lib/rt/pure/__release - local.get $35 + local.get $56 call $~lib/rt/pure/__release - local.get $34 + local.get $57 call $~lib/rt/pure/__release - local.get $30 + local.get $60 call $~lib/rt/pure/__release - local.get $29 + local.get $61 call $~lib/rt/pure/__release - local.get $28 + local.get $59 call $~lib/rt/pure/__release - local.get $32 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -16027,9 +15842,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $60 i32.load offset=4 - local.tee $57 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -16037,7 +15852,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $57 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -16045,7 +15860,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $57 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -16053,7 +15868,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $57 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -16061,9 +15876,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $54 + local.get $60 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $52 + local.tee $61 i32.load offset=12 i32.const 10 i32.ne @@ -16076,14 +15891,14 @@ unreachable end loop $for-loop|1 - local.get $51 + local.get $41 i32.const 10 i32.lt_s if - local.get $52 - local.get $51 + local.get $61 + local.get $41 call $~lib/array/Array#__get - local.get $51 + local.get $41 i32.ne if i32.const 0 @@ -16093,10 +15908,10 @@ call $~lib/builtins/abort unreachable end - local.get $51 + local.get $41 i32.const 1 i32.add - local.set $51 + local.set $41 br $for-loop|1 end end @@ -16106,9 +15921,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $59 i32.load offset=4 - local.tee $51 + local.tee $1 i32.const 1 i32.const 2 i32.const 15 @@ -16116,7 +15931,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $51 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -16124,7 +15939,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $51 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -16132,7 +15947,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $51 + local.get $1 i32.const 1 i32.const 2 i32.const 15 @@ -16140,17 +15955,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $50 + local.get $59 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $57 + local.set $56 i32.const 8 i32.const 2 i32.const 15 i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $55 - local.get $57 + local.set $57 + local.get $56 i32.load offset=12 i32.const 8 i32.ne @@ -16163,21 +15978,21 @@ unreachable end i32.const 0 - local.set $51 + local.set $41 loop $for-loop|2 - local.get $51 - local.get $55 + local.get $41 + local.get $57 i32.load offset=12 i32.lt_s if - local.get $57 - local.get $51 + local.get $56 + local.get $41 call $~lib/array/Array#__get - local.tee $53 - local.get $55 - local.get $51 + local.tee $0 + local.get $57 + local.get $41 call $~lib/array/Array#__get - local.tee $49 + local.tee $1 call $~lib/string/String.__eq i32.eqz if @@ -16188,14 +16003,14 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $0 call $~lib/rt/pure/__release - local.get $49 + local.get $1 call $~lib/rt/pure/__release - local.get $51 + local.get $41 i32.const 1 i32.add - local.set $51 + local.set $41 br $for-loop|2 end end @@ -16205,9 +16020,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $0 i32.load offset=4 - local.tee $53 + local.tee $1 i32.const 0 i32.const 2 i32.const 3 @@ -16215,7 +16030,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $53 + local.get $1 i32.const 0 i32.const 2 i32.const 3 @@ -16223,9 +16038,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $51 + local.get $0 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $53 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -16235,33 +16050,33 @@ call $~lib/builtins/abort unreachable end - local.get $51 - call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $42 + local.get $1 call $~lib/rt/pure/__release - local.get $56 + local.get $35 call $~lib/rt/pure/__release local.get $31 call $~lib/rt/pure/__release - local.get $1 + local.get $32 call $~lib/rt/pure/__release - local.get $59 + local.get $27 call $~lib/rt/pure/__release - local.get $58 + local.get $34 call $~lib/rt/pure/__release - local.get $54 + local.get $33 call $~lib/rt/pure/__release - local.get $52 + local.get $40 call $~lib/rt/pure/__release - local.get $50 + local.get $60 call $~lib/rt/pure/__release - local.get $57 + local.get $61 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 ) (func $~start diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 7836ae645a..ec9173e528 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.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 $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))) @@ -24,7 +24,6 @@ (data (i32.const 1392) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) - (global $~argumentsLength (mut i32) (i32.const 0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) @@ -1573,87 +1572,8 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor|trampoline (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 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 - i32.const 16 - i32.sub - i32.load offset=12 - local.set $1 - end - local.get $1 - local.tee $2 - i32.const 1073741808 - i32.gt_u - local.get $1 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.gt_u - i32.or - if - i32.const 1040 - i32.const 1408 - i32.const 25 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 15 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 - local.get $0 - i32.store offset=4 - local.get $3 - local.get $2 - i32.store offset=8 - local.get $3 - ) (func $~setArgumentsLength (param $0 i32) - local.get $0 - global.set $~argumentsLength + nop ) (func $start:std/arraybuffer (local $0 i32) @@ -1662,6 +1582,10 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -1670,7 +1594,7 @@ call $~lib/memory/memory.fill local.get $1 call $~lib/rt/pure/__retain - local.tee $5 + local.tee $9 i32.const 16 i32.sub i32.load offset=12 @@ -1684,11 +1608,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 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 @@ -1702,8 +1626,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $1 + local.get $9 i32.eq if i32.const 0 @@ -1713,13 +1637,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -1733,7 +1658,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const -1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice @@ -1753,7 +1678,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const 1 i32.const 3 call $~lib/arraybuffer/ArrayBuffer#slice @@ -1773,7 +1698,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice @@ -1793,7 +1718,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice @@ -1814,14 +1739,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const -4 i32.const 42 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $4 + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -1835,14 +1760,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $9 i32.const 42 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $4 - call $~lib/rt/pure/__release + local.set $7 local.get $0 + call $~lib/rt/pure/__release + local.get $7 i32.const 16 i32.sub i32.load offset=12 @@ -1854,7 +1779,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $7 i32.eqz if i32.const 0 @@ -1870,7 +1795,7 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $4 + local.set $6 i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1878,16 +1803,16 @@ i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $3 + local.tee $0 i32.const 1376 i32.const 8 call $~lib/memory/memory.copy local.get $1 - local.get $3 + local.get $0 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $3 + local.get $0 i32.store offset=4 local.get $1 i32.const 8 @@ -1904,22 +1829,76 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.set $3 - i32.const 1 - global.set $~argumentsLength - local.get $4 + local.get $6 i32.load - call $~lib/dataview/DataView#constructor|trampoline - local.set $2 + local.tee $1 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.const 1073741808 + i32.gt_u local.get $5 - call $~lib/rt/pure/__release + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.gt_u + i32.or + if + i32.const 1040 + i32.const 1408 + i32.const 25 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 15 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $8 + i32.const 0 + i32.store + local.get $8 + i32.const 0 + i32.store offset=4 + local.get $8 + i32.const 0 + i32.store offset=8 + local.get $1 + local.set $0 + local.get $1 + local.get $8 + i32.load + local.tee $2 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + end + local.get $8 local.get $0 + i32.store + local.get $8 + local.get $1 + i32.store offset=4 + local.get $8 + local.get $5 + i32.store offset=8 + local.get $9 call $~lib/rt/pure/__release - local.get $4 + local.get $7 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $8 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 79c3b3d506..0e80788972 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) @@ -1111,83 +1111,6 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $2 - i32.const 0 - i32.store8 - local.get $2 - i32.const 4 - i32.add - local.tee $1 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 0 - i32.store8 offset=2 - local.get $1 - i32.const 0 - i32.store8 offset=1 - local.get $2 - i32.const 0 - i32.store8 offset=3 - local.get $1 - i32.const 0 - i32.store8 - local.get $0 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.store offset=8 - local.get $0 - ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 @@ -1837,51 +1760,124 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $3 + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc local.tee $1 + local.tee $0 + i32.const 0 + i32.store8 + local.get $0 + i32.const 4 + i32.add + local.tee $2 + i32.const 0 + i32.store8 offset=3 + local.get $0 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $0 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 + local.get $3 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $3 + end + local.get $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 $1 + local.set $0 + local.get $1 + local.get $3 + i32.load + local.tee $2 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $0 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + i32.const 8 + i32.store offset=8 + local.get $3 i32.const 0 i32.const 246 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 1 i32.const 224 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 2 i32.const 88 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 3 i32.const 159 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 4 i32.const 130 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 5 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 6 i32.const 67 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 7 i32.const 95 call $~lib/typedarray/Uint8Array#__set - 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 i32.load offset=8 call $~lib/dataview/DataView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1895,7 +1891,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1909,7 +1905,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1923,7 +1919,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1937,7 +1933,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1951,7 +1947,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1965,7 +1961,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1979,7 +1975,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1993,7 +1989,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -2007,7 +2003,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -2021,7 +2017,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const 7936550095674706383278551e126 @@ -2034,7 +2030,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const -411777475818852546741639e241 @@ -2047,7 +2043,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const -10 @@ -2060,7 +2056,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getInt8 i32.const -32 @@ -2073,7 +2069,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/dataview/DataView#getInt8 i32.const 88 @@ -2086,7 +2082,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 call $~lib/dataview/DataView#getInt8 i32.const -97 @@ -2099,7 +2095,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 call $~lib/dataview/DataView#getInt8 i32.const -126 @@ -2112,7 +2108,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 call $~lib/dataview/DataView#getInt8 i32.const 101 @@ -2125,7 +2121,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 call $~lib/dataview/DataView#getInt8 i32.const 67 @@ -2138,7 +2134,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 7 call $~lib/dataview/DataView#getInt8 i32.const 95 @@ -2151,7 +2147,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2167,7 +2163,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2183,7 +2179,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2199,7 +2195,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2215,7 +2211,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2231,7 +2227,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2247,7 +2243,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2263,7 +2259,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2279,7 +2275,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2295,7 +2291,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2311,7 +2307,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2327,7 +2323,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2343,7 +2339,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2359,7 +2355,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2375,7 +2371,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2389,7 +2385,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2403,7 +2399,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2417,7 +2413,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2431,7 +2427,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2445,7 +2441,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2459,7 +2455,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2473,7 +2469,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2487,7 +2483,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2501,7 +2497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2515,7 +2511,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const 6864441868736323830 @@ -2528,7 +2524,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const -657428103485373601 @@ -2541,7 +2537,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 246 @@ -2554,7 +2550,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getUint8 i32.const 224 @@ -2567,7 +2563,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/dataview/DataView#getUint8 i32.const 88 @@ -2580,7 +2576,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 call $~lib/dataview/DataView#getUint8 i32.const 159 @@ -2593,7 +2589,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 call $~lib/dataview/DataView#getUint8 i32.const 130 @@ -2606,7 +2602,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 call $~lib/dataview/DataView#getUint8 i32.const 101 @@ -2619,7 +2615,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 call $~lib/dataview/DataView#getUint8 i32.const 67 @@ -2632,7 +2628,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 7 call $~lib/dataview/DataView#getUint8 i32.const 95 @@ -2645,7 +2641,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2661,7 +2657,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2677,7 +2673,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2693,7 +2689,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2709,7 +2705,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2725,7 +2721,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2741,7 +2737,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2757,7 +2753,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2773,7 +2769,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2789,7 +2785,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2805,7 +2801,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2821,7 +2817,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2837,7 +2833,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2853,7 +2849,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2869,7 +2865,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2883,7 +2879,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2897,7 +2893,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2911,7 +2907,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2925,7 +2921,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2939,7 +2935,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2953,7 +2949,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2967,7 +2963,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2981,7 +2977,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2995,7 +2991,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3009,7 +3005,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 @@ -3022,7 +3018,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 @@ -3035,11 +3031,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 f32.const 1.5976661625240943e-18 i32.const 1 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -3053,11 +3049,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 f32.const 1976281973381696323584 i32.const 0 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -3071,11 +3067,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 f64.const -1094252199637739024055454e124 i32.const 1 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const -1094252199637739024055454e124 @@ -3088,11 +3084,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 f64.const 6.022586634778589e-103 i32.const 0 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const 6.022586634778589e-103 @@ -3106,7 +3102,7 @@ unreachable end i32.const 0 - local.get $0 + local.get $1 i32.load offset=8 i32.ge_u if @@ -3117,11 +3113,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 i32.const 108 i32.store8 - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const 108 @@ -3134,11 +3130,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const -13360 i32.const 1 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -3154,11 +3150,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 14689 i32.const 0 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -3174,11 +3170,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1204680201 i32.const 1 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -3192,11 +3188,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 660673230 i32.const 0 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -3210,11 +3206,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i64.const -3290739641816099749 i32.const 1 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const -3290739641816099749 @@ -3227,11 +3223,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i64.const 8178932412950708047 i32.const 0 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const 8178932412950708047 @@ -3245,7 +3241,7 @@ unreachable end i32.const 0 - local.get $0 + local.get $1 i32.load offset=8 i32.ge_u if @@ -3256,11 +3252,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=4 i32.const 238 i32.store8 - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 238 @@ -3273,11 +3269,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 58856 i32.const 1 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -3293,11 +3289,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 60400 i32.const 0 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -3313,11 +3309,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const -846805744 i32.const 1 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $1 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -3331,11 +3327,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const -1510791631 i32.const 0 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $1 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3349,11 +3345,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i64.const 2334704782995986958 i32.const 1 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $1 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 @@ -3366,11 +3362,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i64.const -7123186897289856329 i32.const 0 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $1 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 @@ -3383,19 +3379,21 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load - local.tee $2 - i32.const 0 - local.get $2 + local.tee $0 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 0 local.get $2 + call $~lib/dataview/DataView#constructor + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -3405,7 +3403,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.load offset=8 i32.const 8 i32.ne @@ -3417,9 +3415,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index c0d5921128..0783e5e9da 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1949,7 +1949,7 @@ local.get $1 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $5 local.get $2 i32.shr_u i32.gt_u @@ -1970,16 +1970,11 @@ local.get $0 i32.load local.set $3 - local.get $1 - local.get $2 - i32.shl - local.tee $2 - local.set $5 call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 16 i32.sub - local.set $1 + local.set $4 local.get $3 i32.const 15 i32.and @@ -1988,7 +1983,7 @@ local.get $3 select if (result i32) - local.get $1 + local.get $4 i32.load i32.const 1 i32.and @@ -1997,7 +1992,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $4 i32.load offset=4 i32.const -268435456 i32.and @@ -2014,16 +2009,19 @@ call $~lib/builtins/abort unreachable end + local.get $4 local.get $1 - local.get $5 + local.get $2 + i32.shl + local.tee $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 - local.get $4 + local.get $5 i32.add local.get $2 - local.get $4 + local.get $5 i32.sub call $~lib/memory/memory.fill local.get $1 @@ -2071,9 +2069,9 @@ local.get $3 i32.store offset=12 end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add local.get $2 i32.store8 @@ -3117,8 +3115,10 @@ i32.store offset=20 local.get $0 call $~lib/map/Map#clear + local.get $0 + local.set $1 loop $for-loop|1 - local.get $1 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3126,8 +3126,8 @@ i32.const 100 i32.lt_s if - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has if i32.const 0 @@ -3137,9 +3137,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 local.get $1 + local.get $7 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3148,8 +3148,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3160,10 +3160,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3179,14 +3179,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 + local.set $7 br $for-loop|1 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -3199,9 +3199,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3209,8 +3209,8 @@ i32.const 100 i32.lt_s if - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3221,10 +3221,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3240,9 +3240,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 local.get $1 + local.get $7 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3251,8 +3251,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3263,10 +3263,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3282,14 +3282,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 + local.set $7 br $for-loop|3 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -3301,46 +3301,46 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/map/Map#keys - local.set $4 - local.get $0 + local.set $7 + local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $3 i32.const 24 i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $4 loop $for-loop|4 - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=12 i32.lt_s if - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=12 i32.ge_u if @@ -3351,18 +3351,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=4 i32.add i32.load8_s - local.set $1 + local.set $5 + local.get $3 local.get $6 - local.get $2 call $~lib/array/Array#__get - local.set $7 - local.get $0 + local.set $2 local.get $1 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -3373,8 +3373,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $1 + local.get $2 i32.const 20 i32.sub call $~lib/map/Map#has @@ -3387,27 +3387,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 - local.get $1 + local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 - local.get $7 + local.get $4 + local.get $2 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3419,7 +3419,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3432,9 +3432,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $6 loop $for-loop|6 - local.get $2 + local.get $6 i32.const 24 i32.shl i32.const 24 @@ -3442,8 +3442,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -3454,10 +3454,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#get - local.get $2 + local.get $6 i32.const 24 i32.shl i32.const 24 @@ -3473,11 +3473,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -3487,14 +3487,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|6 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -3507,9 +3507,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $6 loop $for-loop|8 - local.get $2 + local.get $6 i32.const 24 i32.shl i32.const 24 @@ -3517,8 +3517,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -3528,9 +3528,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $1 + local.get $6 + local.get $6 i32.const 24 i32.shl i32.const 24 @@ -3539,8 +3539,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -3551,11 +3551,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -3565,14 +3565,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|8 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -3584,9 +3584,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/map/Map#clear - local.get $0 + local.get $1 i32.load offset=20 if i32.const 0 @@ -3596,16 +3596,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -4338,15 +4338,17 @@ i32.store offset=20 local.get $0 call $~lib/map/Map#clear + local.get $0 + local.set $1 loop $for-loop|1 - local.get $1 + local.get $7 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has if i32.const 0 @@ -4356,17 +4358,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 local.get $1 + local.get $7 + local.get $7 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4377,10 +4379,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 255 i32.and i32.const 10 @@ -4394,14 +4396,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 + local.set $7 br $for-loop|1 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -4414,16 +4416,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $7 loop $for-loop|3 - local.get $1 + local.get $7 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4434,10 +4436,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 255 i32.and i32.const 10 @@ -4451,17 +4453,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 local.get $1 + local.get $7 + local.get $7 i32.const 255 i32.and i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4472,10 +4474,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $7 call $~lib/map/Map#get - local.get $1 + local.get $7 i32.const 255 i32.and i32.const 20 @@ -4489,14 +4491,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.const 1 i32.add - local.set $1 + local.set $7 br $for-loop|3 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -4508,46 +4510,46 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/map/Map#keys - local.set $4 - local.get $0 + local.set $7 + local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $3 i32.const 24 i32.const 10 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $4 loop $for-loop|4 - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=12 i32.lt_s if - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=12 i32.ge_u if @@ -4558,18 +4560,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $4 + local.get $6 + local.get $7 i32.load offset=4 i32.add i32.load8_u - local.set $1 + local.set $5 + local.get $3 local.get $6 - local.get $2 call $~lib/array/Array#__get - local.set $7 - local.get $0 + local.set $2 local.get $1 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -4580,8 +4582,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $1 + local.get $2 i32.const 20 i32.sub call $~lib/map/Map#has @@ -4594,27 +4596,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 - local.get $1 + local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 - local.get $7 + local.get $4 + local.get $2 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4626,7 +4628,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4639,16 +4641,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $6 loop $for-loop|6 - local.get $2 + local.get $6 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -4659,10 +4661,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#get - local.get $2 + local.get $6 i32.const 255 i32.and i32.const 20 @@ -4676,11 +4678,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -4690,14 +4692,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|6 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -4710,16 +4712,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $6 loop $for-loop|8 - local.get $2 + local.get $6 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -4729,17 +4731,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $1 + local.get $6 + local.get $6 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -4750,11 +4752,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $1 + local.get $6 call $~lib/map/Map#has if i32.const 0 @@ -4764,14 +4766,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.const 1 i32.add - local.set $2 + local.set $6 br $for-loop|8 end end - local.get $0 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -4783,9 +4785,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/map/Map#clear - local.get $0 + local.get $1 i32.load offset=20 if i32.const 0 @@ -4795,16 +4797,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $~lib/util/hash/hash16 (param $0 i32) (result i32) local.get $0 @@ -5640,28 +5642,28 @@ i32.const 11 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 loop $for-loop|1 - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5669,8 +5671,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -5680,9 +5682,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $1 + local.get $2 + local.get $3 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5691,8 +5693,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -5703,10 +5705,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5722,14 +5724,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|1 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5742,9 +5744,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|3 - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5752,8 +5754,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -5764,10 +5766,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5783,9 +5785,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $1 + local.get $2 + local.get $3 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5794,8 +5796,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -5806,10 +5808,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -5825,14 +5827,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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5844,10 +5846,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/map/Map#keys local.set $4 - local.get $0 + local.get $2 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -5877,12 +5879,13 @@ call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 - local.get $2 + local.get $0 local.get $4 i32.load offset=12 i32.lt_s if - local.get $2 + local.get $0 + local.tee $1 local.get $4 i32.load offset=12 i32.ge_u @@ -5896,18 +5899,18 @@ end local.get $4 i32.load offset=4 - local.get $2 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_s - local.set $1 + local.set $0 local.get $6 - local.get $2 + local.get $1 call $~lib/array/Array#__get local.set $7 + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5918,7 +5921,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 local.get $7 i32.const 20 i32.sub @@ -5933,22 +5936,22 @@ unreachable end local.get $3 - local.get $1 - local.get $1 + local.get $0 + local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|4 end end @@ -5977,9 +5980,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $0 loop $for-loop|6 - local.get $2 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -5987,8 +5990,8 @@ i32.const 50 i32.lt_s if - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -5999,10 +6002,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#get - local.get $2 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -6018,11 +6021,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 - call $~lib/map/Map#delete local.get $0 + call $~lib/map/Map#delete local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -6032,14 +6035,14 @@ 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|6 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -6052,9 +6055,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $0 loop $for-loop|8 - local.get $2 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -6062,8 +6065,8 @@ i32.const 50 i32.lt_s if - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -6073,9 +6076,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 local.get $2 + local.get $0 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -6084,8 +6087,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -6096,11 +6099,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 - call $~lib/map/Map#delete local.get $0 + call $~lib/map/Map#delete local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -6110,14 +6113,14 @@ 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|8 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -6129,9 +6132,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 + local.get $2 i32.load offset=20 if i32.const 0 @@ -6149,7 +6152,7 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) @@ -6868,35 +6871,35 @@ i32.const 14 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 loop $for-loop|1 - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -6906,17 +6909,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $1 + local.get $2 + local.get $3 + local.get $3 i32.const 65535 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -6927,10 +6930,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 10 @@ -6944,14 +6947,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|1 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -6964,16 +6967,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|3 - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -6984,10 +6987,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 10 @@ -7001,17 +7004,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $1 + local.get $2 + local.get $3 + local.get $3 i32.const 65535 i32.and i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7022,10 +7025,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 20 @@ -7039,14 +7042,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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -7058,10 +7061,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/map/Map#keys local.set $4 - local.get $0 + local.get $2 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -7091,12 +7094,13 @@ call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 - local.get $2 + local.get $0 local.get $4 i32.load offset=12 i32.lt_s if - local.get $2 + local.get $0 + local.tee $1 local.get $4 i32.load offset=12 i32.ge_u @@ -7110,18 +7114,18 @@ end local.get $4 i32.load offset=4 - local.get $2 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_u - local.set $1 + local.set $0 local.get $6 - local.get $2 + local.get $1 call $~lib/array/Array#__get local.set $7 + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7132,7 +7136,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 local.get $7 i32.const 20 i32.sub @@ -7147,22 +7151,22 @@ unreachable end local.get $3 - local.get $1 - local.get $1 + local.get $0 + local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|4 end end @@ -7191,16 +7195,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $0 loop $for-loop|6 - local.get $2 + local.get $0 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -7211,10 +7215,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#get - local.get $2 + local.get $0 i32.const 65535 i32.and i32.const 20 @@ -7228,11 +7232,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 - call $~lib/map/Map#delete local.get $0 + call $~lib/map/Map#delete local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -7242,14 +7246,14 @@ 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|6 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -7262,16 +7266,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $0 loop $for-loop|8 - local.get $2 + local.get $0 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -7281,17 +7285,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 local.get $2 + 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.get $0 local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -7302,11 +7306,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 - call $~lib/map/Map#delete local.get $0 + call $~lib/map/Map#delete local.get $2 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -7316,14 +7320,14 @@ 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|8 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -7335,9 +7339,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 + local.get $2 i32.load offset=20 if i32.const 0 @@ -7355,7 +7359,7 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index f6c655a2f0..e86086710a 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -218,7 +218,7 @@ f64.sub f64.const 0 f64.ne - if + if (result f64) local.get $1 f64.const 0.5 f64.mul @@ -226,11 +226,12 @@ f64.const 8988465674311579538646525e283 local.get $0 f64.copysign - local.set $0 + else + local.get $0 end - local.get $0 local.get $1 f64.sub + i32.const 0 local.get $1 i64.reinterpret_f64 i64.const 52 @@ -239,15 +240,13 @@ i64.and i32.wrap_i64 local.tee $3 - i32.eqz - if + if (result i32) + local.get $3 + else local.get $3 i32.const 1 i32.add - local.set $3 end - i32.const 0 - local.get $3 i32.const -1075 i32.add i32.sub @@ -412,7 +411,7 @@ f32.sub f32.const 0 f32.ne - if + if (result f32) local.get $1 f32.const 0.5 f32.mul @@ -420,11 +419,12 @@ f32.const 1701411834604692317316873e14 local.get $0 f32.copysign - local.set $0 + else + local.get $0 end - local.get $0 local.get $1 f32.sub + i32.const 0 local.get $1 i32.reinterpret_f32 i32.const 23 @@ -432,15 +432,13 @@ i32.const 255 i32.and local.tee $3 - i32.eqz - if + if (result i32) + local.get $3 + else local.get $3 i32.const 1 i32.add - local.set $3 end - i32.const 0 - local.get $3 i32.const -150 i32.add i32.sub diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 48e043a3d6..450c592cb8 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,48 +1,37 @@ (module (type $none_=>_none (func)) (memory $0 0) - (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $std/new/AClass#constructor + (func $~start (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 $1 - i32.const 16 - i32.add - local.tee $0 + i32.const 1056 memory.size - local.tee $3 + local.tee $1 i32.const 16 i32.shl - local.tee $2 + local.tee $0 i32.gt_u if - local.get $3 + local.get $1 + i32.const 66591 local.get $0 - local.get $2 i32.sub - i32.const 65535 - i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $3 - local.get $2 + local.tee $0 + local.get $1 + local.get $0 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $0 memory.grow i32.const 0 i32.lt_s @@ -51,42 +40,32 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $1 - i32.const 16 - i32.sub - local.tee $0 + i32.const 1024 i32.const 16 i32.store - local.get $0 + i32.const 1028 i32.const 1 - i32.store offset=4 - local.get $0 + i32.store + i32.const 1032 i32.const 3 - i32.store offset=8 - local.get $0 + i32.store + i32.const 1036 i32.const 8 - i32.store offset=12 - local.get $1 + i32.store + i32.const 1040 i32.const 1 i32.store - local.get $1 + i32.const 1044 f32.const 2 - f32.store offset=4 + f32.store i32.const 0 - local.get $1 + i32.const 1040 i32.load i32.const 1 i32.add i32.store - local.get $1 + i32.const 1044 f32.const 3 - f32.store offset=4 - ) - (func $~start - i32.const 1024 - global.set $~lib/rt/stub/offset - call $std/new/AClass#constructor + f32.store ) ) diff --git a/tests/compiler/std/object-literal-unmanaged.optimized.wat b/tests/compiler/std/object-literal-unmanaged.optimized.wat index 63c651dfee..f66c763a3d 100644 --- a/tests/compiler/std/object-literal-unmanaged.optimized.wat +++ b/tests/compiler/std/object-literal-unmanaged.optimized.wat @@ -897,10 +897,10 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 123 i32.store - local.get $0 + local.get $1 global.set $std/object-literal-unmanaged/foo global.get $std/object-literal-unmanaged/foo i32.load diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 685d9d3e24..c8704cde5a 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -151,16 +151,16 @@ local.set $1 local.get $2 if - local.get $0 + local.get $3 i32.load16_u local.tee $2 - local.get $3 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $2 local.get $4 + local.get $2 i32.sub return end @@ -177,7 +177,7 @@ end i32.const 0 ) - (func $start:std/object-literal + (func $~start (local $0 i32) (local $1 i32) i32.const 1136 @@ -207,31 +207,31 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 1040 i32.eq br_if $__inlined_func$~lib/string/String.__eq drop - block $folding-inner0 - i32.const 0 - i32.const 1 - local.get $1 - select - br_if $folding-inner0 - local.get $1 - call $~lib/string/String#get:length - local.tee $0 - i32.const 1040 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $1 - local.get $0 - call $~lib/util/string/compareImpl - i32.eqz - br $__inlined_func$~lib/string/String.__eq - end i32.const 0 + i32.const 0 + i32.const 1 + local.get $0 + select + br_if $__inlined_func$~lib/string/String.__eq + drop + i32.const 0 + local.get $0 + call $~lib/string/String#get:length + local.tee $1 + i32.const 1040 + call $~lib/string/String#get:length + i32.ne + br_if $__inlined_func$~lib/string/String.__eq + drop + local.get $0 + local.get $1 + call $~lib/util/string/compareImpl + i32.eqz end i32.eqz if @@ -279,7 +279,4 @@ unreachable end ) - (func $~start - call $start:std/object-literal - ) ) diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 72bd4a876d..54b91ded84 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -122,16 +122,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -157,28 +157,28 @@ 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 - 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 - br $__inlined_func$~lib/string/String.__eq - end i32.const 0 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + br_if $__inlined_func$~lib/string/String.__eq + drop + i32.const 0 + 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 $__inlined_func$~lib/string/String.__eq + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz end ) (func $start:std/object diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 7f56261ea4..6eb76908ca 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1940,7 +1940,7 @@ local.get $1 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $5 local.get $2 i32.shr_u i32.gt_u @@ -1961,16 +1961,11 @@ local.get $0 i32.load local.set $3 - local.get $1 - local.get $2 - i32.shl - local.tee $2 - local.set $5 call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 16 i32.sub - local.set $1 + local.set $4 local.get $3 i32.const 15 i32.and @@ -1979,7 +1974,7 @@ local.get $3 select if (result i32) - local.get $1 + local.get $4 i32.load i32.const 1 i32.and @@ -1988,7 +1983,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $4 i32.load offset=4 i32.const -268435456 i32.and @@ -2005,16 +2000,19 @@ call $~lib/builtins/abort unreachable end + local.get $4 local.get $1 - local.get $5 + local.get $2 + i32.shl + local.tee $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 - local.get $4 + local.get $5 i32.add local.get $2 - local.get $4 + local.get $5 i32.sub call $~lib/memory/memory.fill local.get $1 @@ -2062,9 +2060,9 @@ local.get $3 i32.store offset=12 end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add local.get $2 i32.store8 @@ -2191,9 +2189,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_s ) @@ -2954,9 +2952,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_u ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 62ec0533db..fd042e4d92 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1568,7 +1568,7 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 268435455 i32.and local.set $1 @@ -1605,36 +1605,37 @@ end local.get $1 i32.load - local.tee $1 + local.tee $2 if - local.get $1 + local.get $2 call $~lib/rt/pure/__visit end br $__inlined_func$~lib/rt/__visit_members end local.get $1 local.get $1 + local.tee $2 i32.const 16 i32.sub i32.load offset=12 i32.add - local.set $3 + local.set $1 loop $while-continue|0 + local.get $2 local.get $1 - local.get $3 i32.lt_u if - local.get $1 + local.get $2 i32.load local.tee $4 if local.get $4 call $~lib/rt/pure/__visit end - local.get $1 + local.get $2 i32.const 4 i32.add - local.set $1 + local.set $2 br $while-continue|0 end end @@ -1642,7 +1643,7 @@ end unreachable end - local.get $2 + local.get $3 i32.const -2147483648 i32.and if @@ -1680,7 +1681,7 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $3 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index faf09b32c3..84e7eb0428 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -2634,10 +2634,6 @@ 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 @@ -2678,7 +2674,9 @@ unreachable end local.get $0 - local.get $2 + local.get $1 + local.get $5 + i32.sub call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index f776553960..bc2ead8916 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -455,16 +455,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -490,28 +490,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -565,21 +567,21 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 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 $2 @@ -589,13 +591,15 @@ i32.mul i32.add local.set $7 - local.get $5 + local.get $4 local.set $3 loop $while-continue|0 local.get $2 local.get $7 i32.ne if + local.get $2 + local.set $6 local.get $2 i32.load offset=8 i32.const 1 @@ -603,16 +607,16 @@ i32.eqz if local.get $3 - local.get $2 + local.get $6 i32.load i32.store local.get $3 - local.get $2 + local.get $6 i32.load offset=4 i32.store offset=4 local.get $3 - local.get $4 - local.get $2 + local.get $5 + local.get $6 i32.load call $~lib/util/hash/hashStr local.get $1 @@ -620,10 +624,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $3 i32.store local.get $3 @@ -638,29 +642,34 @@ br $while-continue|0 end end - local.get $4 - local.tee $2 + local.get $5 + local.tee $3 local.get $0 + local.tee $2 i32.load i32.ne drop - 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 $0 + local.get $4 + local.tee $1 + local.get $2 + local.tee $3 i32.load offset=8 + i32.ne drop - local.get $0 - local.get $5 + local.get $3 + local.get $1 i32.store offset=8 - local.get $0 - local.get $6 + local.get $3 + local.get $8 i32.store offset=12 - local.get $0 - local.get $0 + local.get $3 + local.get $3 i32.load offset=20 i32.store offset=16 ) @@ -834,21 +843,21 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 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 $2 @@ -858,13 +867,15 @@ i32.mul i32.add local.set $7 - local.get $5 + local.get $4 local.set $3 loop $while-continue|0 local.get $2 local.get $7 i32.ne if + local.get $2 + local.set $6 local.get $2 i32.load offset=8 i32.const 1 @@ -872,16 +883,16 @@ i32.eqz if local.get $3 - local.get $2 + local.get $6 i32.load i32.store local.get $3 - local.get $2 + local.get $6 i32.load offset=4 i32.store offset=4 local.get $3 - local.get $4 - local.get $2 + local.get $5 + local.get $6 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -889,10 +900,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 + local.get $6 local.get $3 i32.store local.get $3 @@ -907,29 +918,34 @@ br $while-continue|0 end end - local.get $4 - local.tee $2 + local.get $5 + local.tee $3 local.get $0 + local.tee $2 i32.load i32.ne drop - 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 $0 + local.get $4 + local.tee $1 + local.get $2 + local.tee $3 i32.load offset=8 + i32.ne drop - local.get $0 - local.get $5 + local.get $3 + local.get $1 i32.store offset=8 - local.get $0 - local.get $6 + local.get $3 + local.get $8 i32.store offset=12 - local.get $0 - local.get $0 + local.get $3 + local.get $3 i32.load offset=20 i32.store offset=16 ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index f1b2294396..1f374b5cda 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -3101,7 +3101,6 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/tlsf/__alloc @@ -3109,27 +3108,28 @@ local.get $0 local.get $1 i32.shl - local.tee $4 - local.set $6 - local.get $4 + local.tee $1 + local.set $5 + local.get $1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $4 local.get $3 if - local.get $1 + local.get $4 local.get $3 - local.get $6 + local.get $5 call $~lib/memory/memory.copy end - local.get $1 + local.get $4 + local.tee $3 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $1 + local.get $3 i32.store offset=4 local.get $2 - local.get $4 + local.get $1 i32.store offset=8 local.get $2 local.get $0 @@ -17655,13 +17655,14 @@ local.get $4 i32.eqz if - local.get $0 - i64.load - local.tee $3 - i64.eqz - if (result i32) + block $__inlined_func$~lib/util/number/itoa64 (result i32) i32.const 2944 - else + local.get $0 + i64.load + local.tee $3 + i64.eqz + br_if $__inlined_func$~lib/util/number/itoa64 + drop local.get $3 i64.const 63 i64.shr_u @@ -17871,13 +17872,14 @@ local.get $3 i32.eqz if - local.get $0 - i64.load - local.tee $4 - i64.eqz - if (result i32) + block $__inlined_func$~lib/util/number/utoa64 (result i32) i32.const 2944 - else + 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 @@ -19481,51 +19483,53 @@ (local $6 i32) i32.const 4316 i32.load - local.tee $5 + local.tee $4 call $~lib/typedarray/Int8Array#constructor - local.tee $6 - local.set $3 + local.tee $5 + local.set $2 loop $for-loop|0 - local.get $2 - local.get $5 + local.get $0 + local.get $4 i32.lt_s if - local.get $3 local.get $2 + local.get $0 i32.const 4304 - local.get $2 + 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 $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - local.get $3 + local.get $2 i32.load - local.get $3 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 + local.set $0 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $2 + local.get $0 i32.const 16 i32.sub i32.load offset=12 local.tee $1 + local.set $6 + i32.const 0 + local.get $1 i32.gt_u if i32.const 1376 @@ -19535,34 +19539,32 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $0 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $0 + local.get $6 i32.store offset=8 local.get $1 - local.get $2 + local.get $0 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 loop $for-loop|1 + local.get $3 local.get $4 - local.get $5 i32.lt_s if + local.get $2 local.get $3 - local.get $4 call $~lib/typedarray/Int8Array#__get - local.get $0 - local.get $4 + local.get $1 + local.get $3 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -19573,19 +19575,19 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -19681,49 +19683,51 @@ (local $6 i32) i32.const 4316 i32.load - local.tee $5 + local.tee $4 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $6 - local.set $3 + local.tee $5 + local.set $2 loop $for-loop|0 - local.get $2 - local.get $5 + local.get $0 + local.get $4 i32.lt_s if - local.get $3 local.get $2 + local.get $0 i32.const 4304 - local.get $2 + local.get $0 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - local.get $3 + local.get $2 i32.load - local.get $3 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 + local.set $0 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $2 + local.get $0 i32.const 16 i32.sub i32.load offset=12 local.tee $1 + local.set $6 + i32.const 0 + local.get $1 i32.gt_u if i32.const 1376 @@ -19733,34 +19737,32 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $0 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $0 + local.get $6 i32.store offset=8 local.get $1 - local.get $2 + local.get $0 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 loop $for-loop|1 + local.get $3 local.get $4 - local.get $5 i32.lt_s if + local.get $2 local.get $3 - local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $0 - local.get $4 + local.get $1 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -19771,19 +19773,19 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -22258,12 +22260,11 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -22277,13 +22278,13 @@ 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 + local.tee $4 local.get $1 i32.load offset=4 local.get $2 @@ -22292,18 +22293,15 @@ i32.add i32.load16_s local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 5296 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 @@ -22785,12 +22783,11 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -22804,13 +22801,13 @@ 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 + local.tee $4 local.get $1 i32.load offset=4 local.get $2 @@ -22819,18 +22816,15 @@ i32.add i32.load16_u local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 5584 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 @@ -24935,15 +24929,14 @@ ) (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) - (local $4 i32) + (local $3 i32) + (local $4 f32) (local $5 f32) - (local $6 f32) 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 @@ -24957,13 +24950,13 @@ 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 + local.tee $4 local.get $1 i32.load offset=4 local.get $2 @@ -24972,18 +24965,15 @@ i32.add f32.load local.tee $5 - local.set $6 - local.get $3 - local.get $5 f32.ne if i32.const 7680 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.promote_f32 - local.get $6 + local.get $5 f64.promote_f32 f64.const 0 f64.const 0 @@ -25366,15 +25356,14 @@ ) (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) - (local $4 i32) + (local $3 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) 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 @@ -25388,13 +25377,13 @@ 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/Float64Array#__get - local.set $3 + local.tee $4 local.get $1 i32.load offset=4 local.get $2 @@ -25403,17 +25392,14 @@ i32.add f64.load local.tee $5 - local.set $6 - local.get $3 - local.get $5 f64.ne if i32.const 8016 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 - local.get $6 + local.get $4 + local.get $5 f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -27653,2799 +27639,2799 @@ br $for-loop|0 end end - 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 - 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 + block $folding-inner18 + block $folding-inner1 + block $folding-inner0 + block $folding-inner17 + block $folding-inner16 + 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 + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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-inner3 + 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 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + 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-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 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 + 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-inner3 + 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 - 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.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-inner4 + 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-inner4 + 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-inner4 + 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 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 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength 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 + 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-inner4 + 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 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.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 + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner4 + 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-inner4 + 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-inner4 + 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-inner4 + 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-inner4 + 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 - local.set $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-inner4 + 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 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 + 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 + local.get $22 + f64.const 6 + f64.ne + br_if $folding-inner4 + 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 $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 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 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 + 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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|010 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 $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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|011 local.get $1 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set + 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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set + 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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 - i32.const 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 - 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 $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.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 + i32.add + local.get $23 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|014 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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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.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 + i32.add + local.get $23 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|015 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 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 - local.get $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 - local.get $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_u - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|06 - 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 - 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 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 - 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 $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 - 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_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 - 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.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 $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 - 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.const 0 - call $~lib/rt/tlsf/__alloc - local.set $27 - loop $for-loop|011 - 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 $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 - 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 $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 - 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 - 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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner7 + 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 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner7 + 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 - i32.const 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner9 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner7 + 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 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner10 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner7 + 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 - 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 2704 - 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 2704 - 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 2704 - 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 $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.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 + 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-inner5 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner6 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner7 + 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-inner8 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner9 + 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-inner8 + local.get $1 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner9 + 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-inner10 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner10 + local.get $1 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner11 + 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-inner12 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner13 + 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-inner12 + local.get $1 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner13 + 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 2704 + 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 2704 + 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 2704 + 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 + block $folding-inner2 global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 0 @@ -30484,7 +30470,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30523,7 +30509,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30598,7 +30584,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 0 @@ -30667,7 +30653,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 0 @@ -30700,7 +30686,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30733,7 +30719,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30769,7 +30755,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30805,7 +30791,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 0 @@ -30871,7 +30857,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 0 @@ -30937,7 +30923,7 @@ global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne - br_if $folding-inner11 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> @@ -31170,14 +31156,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Int8Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31187,6 +31173,7 @@ i32.const 5 call $~lib/typedarray/Uint8Array#constructor local.tee $1 + local.get $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set @@ -31208,27 +31195,27 @@ call $~lib/typedarray/Uint8Array#__set local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $0 + local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 - local.get $1 + br_if $folding-inner0 call $~lib/typedarray/Uint8Array#join - local.tee $29 + local.tee $0 + local.get $0 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release + br_if $folding-inner1 local.get $29 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 + local.get $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set @@ -31250,22 +31237,21 @@ call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $0 + local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 - local.get $1 + br_if $folding-inner0 call $~lib/typedarray/Uint8Array#join - local.tee $29 + local.tee $0 + local.get $0 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release + br_if $folding-inner1 local.get $29 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release i32.const 5 @@ -31296,14 +31282,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Int16Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31338,14 +31324,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Uint16Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31380,14 +31366,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Int32Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31422,14 +31408,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Uint32Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31464,14 +31450,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Int64Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31506,14 +31492,14 @@ i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner12 + br_if $folding-inner0 local.get $1 call $~lib/typedarray/Uint64Array#join local.tee $29 i32.const 3008 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner13 + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31548,14 +31534,14 @@ i32.const 4176 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner14 + br_if $folding-inner16 local.get $1 call $~lib/typedarray/Float32Array#join local.tee $29 i32.const 4176 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner15 + br_if $folding-inner17 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31590,14 +31576,14 @@ i32.const 4176 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner14 + br_if $folding-inner16 local.get $1 call $~lib/typedarray/Float64Array#join local.tee $29 i32.const 4176 call $~lib/string/String.__eq i32.eqz - br_if $folding-inner15 + br_if $folding-inner17 local.get $0 call $~lib/rt/pure/__release local.get $29 @@ -31727,7 +31713,7 @@ local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner16 + br_if $folding-inner18 local.get $0 i32.load offset=4 i32.const 1 @@ -31793,7 +31779,7 @@ local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner16 + br_if $folding-inner18 local.get $0 i32.load offset=4 i32.const 8 @@ -31896,7 +31882,7 @@ local.get $0 i32.load offset=8 i32.gt_s - br_if $folding-inner16 + br_if $folding-inner18 local.get $0 i32.load offset=4 local.set $23 @@ -31969,112 +31955,112 @@ end i32.const 0 i32.const 1312 - i32.const 323 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 344 + i32.const 323 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 365 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 366 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 367 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 415 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 417 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 438 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 440 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 461 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 463 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 495 + i32.const 463 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 629 + i32.const 626 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 630 + i32.const 627 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 626 + i32.const 629 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 627 + i32.const 630 i32.const 5 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 9e7622c6ef..70df7eb429 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -75,16 +75,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -110,28 +110,30 @@ 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 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + if + i32.const 0 return end - i32.const 0 + 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 $start:typeof (local $0 i32) diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index b4b63fe181..25ff04c5f2 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1052,6 +1052,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 global.set $while/ran i32.const 10 @@ -1152,18 +1153,16 @@ global.set $while/ran i32.const 0 global.set $while/ran - i32.const 0 - local.set $1 loop $while-continue|01 - local.get $1 + local.get $3 i32.const 1 i32.add - local.tee $1 + local.tee $3 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $1 + local.get $3 i32.const 10 i32.ne if @@ -1177,17 +1176,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $1 - loop $while-continue|02 - local.get $1 + local.set $3 + loop $while-continue|002 + local.get $3 i32.const 1 i32.add - local.tee $1 + local.tee $3 i32.const 10 i32.ne - br_if $while-continue|02 + br_if $while-continue|002 end - local.get $1 + local.get $3 i32.const 10 i32.ne if @@ -1213,18 +1212,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $1 - loop $while-continue|03 - local.get $1 + local.set $3 + loop $while-continue|02 + local.get $3 if - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 - br $while-continue|03 + local.set $3 + br $while-continue|02 end end - local.get $1 + local.get $3 if i32.const 0 i32.const 1040 @@ -1241,7 +1240,7 @@ local.set $1 i32.const 10 local.set $0 - loop $while-continue|04 + loop $while-continue|03 local.get $1 if loop $while-continue|1 @@ -1258,7 +1257,7 @@ i32.const 1 i32.sub local.set $1 - br $while-continue|04 + br $while-continue|03 end end local.get $1 @@ -1284,16 +1283,16 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 + local.set $3 call $while/Ref#constructor local.set $1 - loop $while-continue|05 + loop $while-continue|04 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 @@ -1312,10 +1311,10 @@ end local.get $0 local.set $1 - br $while-continue|05 + br $while-continue|04 end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1352,20 +1351,20 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 + local.set $3 call $while/Ref#constructor local.set $1 - loop $while-continue|06 + loop $while-continue|05 block $while-break|0 call $while/Ref#constructor - local.tee $0 + local.tee $2 call $~lib/rt/pure/__release - local.get $0 + local.get $2 if - local.get $2 + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 10 i32.eq if @@ -1378,11 +1377,11 @@ local.set $1 br $while-break|0 end - br $while-continue|06 + br $while-continue|05 end end end - local.get $2 + local.get $3 i32.const 10 i32.ne if From 5451d29f050fb20fd210e2cd200f325af85dfda2 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 07:38:12 +0300 Subject: [PATCH 09/34] better --- cli/asc.js | 2 +- tests/compiler/do.optimized.wat | 102 +-- .../retain-release-sanity.optimized.wat | 104 ++- tests/compiler/std/array.optimized.wat | 642 ++++++++-------- tests/compiler/std/arraybuffer.optimized.wat | 21 +- tests/compiler/std/dataview.optimized.wat | 427 +++++------ tests/compiler/std/map.optimized.wat | 698 +++++++++--------- tests/compiler/std/staticarray.optimized.wat | 20 +- 8 files changed, 1009 insertions(+), 1007 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 68f3e5d1b3..3efef469e9 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -724,6 +724,7 @@ exports.main = function main(argv, options, callback) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs } + add("inlining"); // differs add("optimize-instructions"); // differs if (optimizeLevel >= 3 || shrinkLevel >= 2) { add("precompute-propagate"); @@ -741,7 +742,6 @@ exports.main = function main(argv, options, callback) { // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); // } - add("inlining"); // differs if (optimizeLevel >= 3 && shrinkLevel <= 1) { // differs add("licm"); } diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index d7d4c2c3ed..4490037fce 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1050,19 +1050,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 1040 @@ -1071,7 +1071,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1087,17 +1087,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 @@ -1127,14 +1127,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|01 + loop $do-continue|001 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|01 + br_if $do-continue|001 end local.get $1 i32.const 10 @@ -1151,14 +1151,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|02 + loop $do-continue|01 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-continue|01 end local.get $1 i32.const 10 @@ -1187,14 +1187,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|03 + loop $do-continue|02 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|03 + br_if $do-continue|02 end local.get $1 i32.const 10 @@ -1212,30 +1212,30 @@ i32.const 0 global.set $do/ran i32.const 0 - local.set $0 - i32.const 0 local.set $1 - loop $do-continue|04 - local.get $0 + i32.const 0 + local.set $0 + loop $do-continue|03 + 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 end - br $do-continue|04 + br $do-continue|03 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1246,7 +1246,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 90 i32.ne if @@ -1262,8 +1262,8 @@ i32.const 0 global.set $do/ran call $do/Ref#constructor - local.set $0 - loop $do-continue|05 + local.set $1 + loop $do-continue|04 local.get $2 i32.const 1 i32.add @@ -1272,21 +1272,21 @@ 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 - br_if $do-continue|05 + local.get $0 + local.tee $1 + br_if $do-continue|04 end local.get $2 i32.const 10 @@ -1299,7 +1299,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1310,7 +1310,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 @@ -1327,8 +1327,8 @@ i32.const 0 local.set $2 call $do/Ref#constructor - local.set $0 - loop $do-continue|06 + local.set $1 + loop $do-continue|05 block $do-break|0 local.get $2 i32.const 1 @@ -1337,20 +1337,20 @@ 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 - br_if $do-continue|06 + local.get $0 + br_if $do-continue|05 end end local.get $2 @@ -1364,7 +1364,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1375,7 +1375,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/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index b0885521a0..3d349d6110 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1769,7 +1769,7 @@ i32.const 12 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 12 call $~lib/memory/memory.fill i32.const 16 @@ -1788,9 +1788,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $4 @@ -1806,7 +1805,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 12 @@ -1820,7 +1819,7 @@ call $~lib/array/Array#push local.get $3 i32.load offset=12 - local.tee $1 + local.tee $2 i32.const 1 i32.lt_s if @@ -1833,24 +1832,24 @@ end local.get $3 i32.load offset=4 - local.get $1 + local.get $2 i32.const 1 i32.sub - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load drop local.get $3 - local.get $1 + local.get $2 i32.store offset=12 local.get $3 call $~lib/rt/pure/__release i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1869,9 +1868,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $4 @@ -1887,7 +1885,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 0 @@ -1897,14 +1895,14 @@ i32.store offset=12 local.get $3 loop $for-loop|0 - local.get $2 + local.get $1 i32.const 10 i32.lt_s if i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1923,9 +1921,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $5 @@ -1941,7 +1938,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 0 @@ -1962,7 +1959,7 @@ local.tee $5 i32.const 1 i32.add - local.tee $1 + local.tee $2 call $~lib/array/ensureSize local.get $3 i32.load offset=4 @@ -1973,7 +1970,7 @@ i32.const 1344 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=12 local.get $0 i32.const 1 @@ -1984,10 +1981,10 @@ end local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end @@ -1995,17 +1992,17 @@ i32.const 1360 i32.const 1392 call $~lib/string/String.__concat - local.tee $2 + local.tee $1 i32.const 1456 call $~lib/string/String.__concat - local.get $2 + local.get $1 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 $1 + local.tee $2 i32.const 0 i32.store i32.const 4 @@ -2017,8 +2014,8 @@ i32.store local.get $3 local.tee $0 - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2029,66 +2026,63 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $1 local.get $0 i32.store - local.get $2 + local.get $1 local.set $0 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.set $2 - local.get $1 + local.tee $1 local.get $3 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 - i32.store - local.get $1 - local.set $2 local.get $1 + i32.store + 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 - i32.store local.get $1 - local.set $2 + i32.store local.get $3 - local.get $1 + local.get $2 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2099,25 +2093,25 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $1 local.get $0 i32.store - local.get $1 + local.get $2 local.get $3 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 $3 - local.get $2 - i32.store local.get $1 + i32.store + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 8aff379fe7..c3fe59c202 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -5485,7 +5485,7 @@ i32.const 6064 local.set $1 loop $for-loop|0 - local.get $5 + local.get $4 local.get $0 i32.lt_s if @@ -5521,11 +5521,11 @@ end local.tee $6 call $~lib/string/String.__concat - local.tee $4 + local.tee $5 local.set $2 + local.get $5 local.get $1 local.tee $3 - local.get $4 i32.ne if local.get $2 @@ -5538,17 +5538,97 @@ local.set $1 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 $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end local.get $1 ) + (func $std/array/createRandomStringArray (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1600 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + i32.const 0 + i32.const 1600 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 16 + 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 $0 + local.set $1 + local.get $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 1600 + i32.store offset=8 + local.get $2 + i32.const 400 + i32.store offset=12 + loop $for-loop|0 + local.get $3 + i32.const 400 + i32.lt_s + if + local.get $2 + local.get $3 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9607,7 +9687,7 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $58 + local.set $61 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -9615,27 +9695,27 @@ i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $58 + local.get $61 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $58 + local.set $61 end - local.get $58 + local.get $61 i32.const 0 i32.store - local.get $58 + local.get $61 i32.const 0 i32.store offset=4 - local.get $58 + local.get $61 i32.const 0 i32.store offset=8 local.get $1 local.tee $0 - local.get $58 + local.get $61 i32.load local.tee $59 i32.ne @@ -9646,13 +9726,13 @@ local.get $59 call $~lib/rt/pure/__release end - local.get $58 + local.get $61 local.get $0 i32.store - local.get $58 + local.get $61 local.get $1 i32.store offset=4 - local.get $58 + local.get $61 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9666,7 +9746,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $58 + local.get $61 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9674,20 +9754,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 0 i32.const 6 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 call $std/array/isArraysEqual i32.eqz if @@ -9698,20 +9778,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 call $std/array/isArraysEqual i32.eqz if @@ -9722,13 +9802,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 0 i32.const 6 @@ -9746,13 +9826,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 0 i32.const 6 @@ -9770,13 +9850,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 0 i32.const 6 @@ -9794,12 +9874,12 @@ call $~lib/builtins/abort unreachable end - local.get $57 - call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $0 @@ -9812,20 +9892,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9837,20 +9917,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9862,13 +9942,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 2 i32.const 7 @@ -9887,13 +9967,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 2 i32.const 7 @@ -9912,13 +9992,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 5 i32.const 2 i32.const 7 @@ -9937,12 +10017,12 @@ call $~lib/builtins/abort unreachable end - local.get $57 - call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $0 @@ -10266,9 +10346,9 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $61 + local.set $60 global.get $std/array/arr - local.get $61 + local.get $60 call $~lib/array/Array#concat local.set $0 global.get $std/array/arr @@ -10368,16 +10448,16 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $60 i32.const 46 call $~lib/array/Array#push - local.get $61 + local.get $60 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $61 + local.get $60 call $~lib/array/Array#concat - local.set $60 + local.set $61 local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr @@ -10392,7 +10472,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $60 i32.load offset=12 i32.const 2 i32.ne @@ -10404,7 +10484,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.load offset=12 i32.const 5 i32.ne @@ -10416,7 +10496,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10429,7 +10509,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10442,7 +10522,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10455,7 +10535,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10468,7 +10548,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10481,10 +10561,10 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 call $~lib/array/Array#pop drop - local.get $60 + local.get $61 i32.load offset=12 i32.const 4 i32.ne @@ -10516,7 +10596,7 @@ global.get $std/array/arr call $~lib/array/Array#concat local.set $0 - local.get $60 + local.get $61 call $~lib/rt/pure/__release local.get $0 i32.load offset=12 @@ -10540,7 +10620,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $60 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -10817,7 +10897,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $58 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 @@ -10849,14 +10929,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $57 + local.tee $58 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10882,7 +10962,7 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $61 + local.tee $60 i32.const 5 i32.const 2 i32.const 3 @@ -10968,16 +11048,16 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $0 @@ -11156,7 +11236,7 @@ unreachable end global.get $std/array/arr - local.tee $61 + local.tee $60 i32.load offset=12 local.tee $1 i32.const 1 @@ -11169,12 +11249,12 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $60 i32.load offset=4 - local.tee $60 + local.tee $61 i32.load - local.get $60 - local.get $60 + local.get $61 + local.get $61 i32.const 4 i32.add local.get $1 @@ -11186,11 +11266,11 @@ local.tee $1 call $~lib/memory/memory.copy local.get $1 - local.get $60 + local.get $61 i32.add i32.const 0 i32.store - local.get $61 + local.get $60 local.get $0 i32.store offset=12 global.set $std/array/i @@ -11374,30 +11454,30 @@ i32.const 2 i32.shl i32.add - local.set $58 + local.set $61 loop $while-continue|0 local.get $0 - local.get $58 + local.get $61 i32.lt_u if local.get $0 i32.load local.set $1 local.get $0 - local.get $58 + local.get $61 i32.load i32.store - local.get $58 + local.get $61 local.get $1 i32.store local.get $0 i32.const 4 i32.add local.set $0 - local.get $58 + local.get $61 i32.const 4 i32.sub - local.set $58 + local.set $61 br $while-continue|0 end end @@ -11635,17 +11715,17 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 local.set $1 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $57 + local.get $58 i32.load offset=12 - local.tee $61 + local.tee $60 if (result i32) i32.const 0 - local.get $61 + local.get $60 i32.ge_s else i32.const 1 @@ -11660,7 +11740,7 @@ local.set $1 loop $while-continue|022 local.get $0 - local.get $61 + local.get $60 i32.lt_s if local.get $1 @@ -11699,17 +11779,17 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 local.set $1 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $60 + local.get $61 i32.load offset=12 - local.tee $61 + local.tee $60 if (result i32) i32.const 0 - local.get $61 + local.get $60 i32.ge_s else i32.const 1 @@ -11724,7 +11804,7 @@ local.set $1 loop $while-continue|023 local.get $0 - local.get $61 + local.get $60 i32.lt_s if local.get $1 @@ -11757,9 +11837,9 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 call $~lib/rt/pure/__release - local.get $60 + local.get $61 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11907,24 +11987,24 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $58 i32.load offset=12 - local.tee $61 + local.tee $60 if (result i32) i32.const 0 - local.get $61 + local.get $60 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $60 + local.get $58 i32.load offset=4 local.set $1 loop $while-continue|024 local.get $0 - local.get $61 + local.get $60 i32.lt_s if i32.const 1 @@ -11966,7 +12046,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $58 + local.set $0 i32.const 0 i32.const 1 i32.const 3 @@ -11976,10 +12056,10 @@ call $~lib/rt/pure/__retain local.tee $61 i32.load offset=12 - local.tee $59 + local.tee $60 if (result i32) i32.const 0 - local.get $59 + local.get $60 i32.ge_s else i32.const 1 @@ -11990,13 +12070,13 @@ i32.load offset=4 local.set $1 loop $while-continue|025 - local.get $58 - local.get $59 + local.get $0 + local.get $60 i32.lt_s if i32.const 1 local.get $1 - local.get $58 + local.get $0 i32.const 3 i32.shl i32.add @@ -12013,10 +12093,10 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $58 + local.get $0 i32.const 1 i32.add - local.set $58 + local.set $0 br $while-continue|025 end end @@ -12086,7 +12166,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release @@ -12782,7 +12862,7 @@ i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12889,7 +12969,7 @@ local.get $31 i32.const 1 call $~lib/array/Array#__get - local.tee $57 + local.tee $58 i32.load i32.const 4 i32.ne @@ -12916,7 +12996,7 @@ local.get $35 i32.const 0 call $~lib/array/Array#__get - local.tee $60 + local.tee $61 i32.load i32.const 1 i32.ne @@ -12931,7 +13011,7 @@ local.get $35 i32.const 1 call $~lib/array/Array#__get - local.tee $61 + local.tee $60 i32.load i32.const 2 i32.ne @@ -13149,16 +13229,16 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $26 @@ -13666,32 +13746,32 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $58 + local.set $0 global.get $std/array/arr local.tee $61 i32.load offset=12 - local.tee $59 + local.tee $60 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $58 i32.load offset=4 - local.set $0 + local.set $59 loop $for-loop|043 - local.get $58 - local.get $59 + local.get $0 + local.get $60 local.get $61 i32.load offset=12 local.tee $1 - local.get $59 + local.get $60 local.get $1 i32.lt_s select i32.lt_s if - local.get $58 + local.get $0 i32.const 2 i32.shl local.tee $1 @@ -13701,19 +13781,19 @@ i32.load f32.convert_i32_s local.set $47 - local.get $0 local.get $1 + local.get $59 i32.add local.get $47 f32.store - local.get $58 + local.get $0 i32.const 1 i32.add - local.set $58 + local.set $0 br $for-loop|043 end end - local.get $60 + local.get $58 i32.load offset=12 i32.const 4 i32.ne @@ -13725,7 +13805,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $58 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13834,7 +13914,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $60 + local.get $58 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 @@ -14272,25 +14352,25 @@ end local.get $55 i32.load offset=4 - local.set $61 + local.set $60 local.get $59 i32.const 2 i32.eq if - local.get $61 + local.get $60 f32.load offset=4 local.tee $30 - local.get $61 + local.get $60 f32.load local.tee $47 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $61 + local.get $60 local.get $47 f32.store offset=4 - local.get $61 + local.get $60 local.get $30 f32.store end @@ -14303,20 +14383,20 @@ i32.lt_s if i32.const 0 - local.set $60 + local.set $61 loop $for-loop|00 - local.get $60 + local.get $61 local.get $59 i32.lt_s if - local.get $61 local.get $60 + local.get $61 i32.const 2 i32.shl i32.add f32.load local.set $30 - local.get $60 + local.get $61 i32.const 1 i32.sub local.set $0 @@ -14326,7 +14406,7 @@ i32.ge_s if local.get $30 - local.get $61 + local.get $60 local.get $0 i32.const 2 i32.shl @@ -14342,7 +14422,7 @@ i32.const 1 i32.sub local.set $0 - local.get $61 + local.get $60 local.get $1 i32.const 1 i32.add @@ -14355,7 +14435,7 @@ end end end - local.get $61 + local.get $60 local.get $0 i32.const 1 i32.add @@ -14364,15 +14444,15 @@ i32.add local.get $30 f32.store - local.get $60 + local.get $61 i32.const 1 i32.add - local.set $60 + local.set $61 br $for-loop|00 end end else - local.get $61 + local.get $60 local.get $59 call $~lib/util/sort/weakHeapSort end @@ -14389,7 +14469,7 @@ call $~lib/rt/pure/__retain local.set $51 i32.const 0 - local.set $58 + local.set $57 i32.const 0 local.get $55 i32.load offset=12 @@ -14406,19 +14486,19 @@ br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|001 - local.get $58 + local.get $57 local.get $1 i32.lt_s if local.get $55 - local.get $58 + local.get $57 call $~lib/array/Array#__get local.tee $47 local.get $47 f32.ne if (result i32) local.get $51 - local.get $58 + local.get $57 call $~lib/array/Array#__get local.tee $47 local.get $47 @@ -14430,19 +14510,19 @@ if i32.const 0 local.get $55 - local.get $58 + local.get $57 call $~lib/array/Array#__get local.get $51 - local.get $58 + local.get $57 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $58 + local.get $57 i32.const 1 i32.add - local.set $58 + local.set $57 br $for-loop|001 end end @@ -14476,25 +14556,25 @@ end local.get $54 i32.load offset=4 - local.set $61 + local.set $60 local.get $59 i32.const 2 i32.eq if - local.get $61 + local.get $60 f64.load offset=8 local.tee $29 - local.get $61 + local.get $60 f64.load local.tee $42 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $61 + local.get $60 local.get $42 f64.store offset=8 - local.get $61 + local.get $60 local.get $29 f64.store end @@ -14507,20 +14587,20 @@ i32.lt_s if i32.const 0 - local.set $60 + local.set $61 loop $for-loop|02 - local.get $60 + local.get $61 local.get $59 i32.lt_s if - local.get $61 local.get $60 + local.get $61 i32.const 3 i32.shl i32.add f64.load local.set $29 - local.get $60 + local.get $61 i32.const 1 i32.sub local.set $0 @@ -14530,7 +14610,7 @@ i32.ge_s if local.get $29 - local.get $61 + local.get $60 local.get $0 i32.const 3 i32.shl @@ -14546,7 +14626,7 @@ i32.const 1 i32.sub local.set $0 - local.get $61 + local.get $60 local.get $1 i32.const 1 i32.add @@ -14559,7 +14639,7 @@ end end end - local.get $61 + local.get $60 local.get $0 i32.const 1 i32.add @@ -14568,15 +14648,15 @@ i32.add local.get $29 f64.store - local.get $60 + local.get $61 i32.const 1 i32.add - local.set $60 + local.set $61 br $for-loop|02 end end else - local.get $61 + local.get $60 local.get $59 call $~lib/util/sort/weakHeapSort end @@ -14593,7 +14673,7 @@ call $~lib/rt/pure/__retain local.set $53 i32.const 0 - local.set $60 + local.set $61 i32.const 0 local.get $54 i32.load offset=12 @@ -14610,19 +14690,19 @@ br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 - local.get $60 + local.get $61 local.get $1 i32.lt_s if local.get $54 - local.get $60 + local.get $61 call $~lib/array/Array#__get local.tee $42 local.get $42 f64.ne if (result i32) local.get $53 - local.get $60 + local.get $61 call $~lib/array/Array#__get local.tee $42 local.get $42 @@ -14634,19 +14714,19 @@ if i32.const 0 local.get $54 - local.get $60 + local.get $61 call $~lib/array/Array#__get local.get $53 - local.get $60 + local.get $61 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $60 + local.get $61 i32.const 1 i32.add - local.set $60 + local.set $61 br $for-loop|01 end end @@ -14667,18 +14747,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14725,7 +14805,7 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $58 i32.const 1 i32.const 2 i32.const 3 @@ -14768,8 +14848,8 @@ local.set $43 i32.const 512 call $std/array/createRandomOrderedArray - local.set $60 - local.get $57 + local.set $61 + local.get $58 i32.const 48 call $std/array/assertSorted local.get $50 @@ -14896,7 +14976,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 48 call $std/array/assertSorted local.get $55 @@ -14907,15 +14987,15 @@ call $~lib/rt/pure/__release local.get $53 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release - local.get $61 + local.get $60 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release @@ -14933,7 +15013,7 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $60 + local.get $61 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -14986,31 +15066,31 @@ i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $58 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $58 + local.set $57 local.get $56 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $60 - local.set $61 - local.get $60 + local.tee $61 + local.set $60 + local.get $61 i32.load offset=12 local.set $1 loop $for-loop|025 - local.get $58 + local.get $57 local.get $1 i32.lt_s if - local.get $61 - local.get $58 + local.get $60 + local.get $57 i32.const 1 i32.sub call $~lib/array/Array#__get local.tee $59 - local.get $61 - local.get $58 + local.get $60 + local.get $57 call $~lib/array/Array#__get local.tee $0 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 @@ -15028,10 +15108,10 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 1 i32.add - local.set $58 + local.set $57 br $for-loop|025 end end @@ -15046,57 +15126,57 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $58 + local.set $0 i32.const 0 local.get $56 i32.load offset=12 local.tee $1 - local.get $57 + 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 $56 - local.get $57 + local.get $58 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|03 - local.get $58 + local.get $0 local.get $1 i32.lt_s if local.get $56 - local.get $58 + local.get $0 call $~lib/array/Array#__get - local.tee $59 - local.get $57 + local.tee $60 local.get $58 + local.get $0 call $~lib/array/Array#__get - local.tee $0 + local.tee $59 call $~lib/string/String.__eq i32.eqz if - local.get $59 + local.get $60 call $~lib/rt/pure/__release - local.get $0 + local.get $59 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - local.get $58 i32.const 1 i32.add - local.set $58 + local.set $0 br $for-loop|03 end end @@ -15111,87 +15191,15 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $60 - i32.const 1600 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 1600 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $61 - i32.const 0 - i32.store - local.get $61 - i32.const 0 - i32.store offset=4 - local.get $61 - i32.const 0 - i32.store offset=8 - local.get $61 - i32.const 0 - i32.store offset=12 - local.get $0 + call $std/array/createRandomStringArray local.tee $1 - local.get $61 - i32.load - local.tee $59 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $59 - call $~lib/rt/pure/__release - end - local.get $61 - local.get $1 - i32.store - local.get $61 - local.get $0 - i32.store offset=4 - local.get $61 - i32.const 1600 - i32.store offset=8 - local.get $61 - i32.const 400 - i32.store offset=12 - loop $for-loop|09 - local.get $60 - i32.const 400 - i32.lt_s - if - local.get $61 - local.get $60 - 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 $60 - i32.const 1 - i32.add - local.set $60 - br $for-loop|09 - end - end - local.get $61 i32.const 56 call $std/array/assertSorted<~lib/array/Array> local.get $56 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release - local.get $61 + local.get $1 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15246,7 +15254,7 @@ local.tee $43 i32.const 6512 call $~lib/array/Array#join - local.tee $58 + local.tee $57 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15267,7 +15275,7 @@ local.tee $56 i32.const 6576 call $~lib/array/Array#join - local.tee $57 + local.tee $58 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15290,7 +15298,7 @@ local.get $50 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $60 + local.tee $61 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15308,7 +15316,7 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $60 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join local.tee $59 @@ -15396,18 +15404,18 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $49 @@ -15619,7 +15627,7 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 @@ -15642,11 +15650,11 @@ i32.const 9008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $60 + local.set $61 local.get $1 i32.const 9040 call $~lib/string/String.__eq @@ -15689,7 +15697,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $1 - local.set $61 + local.set $60 local.get $1 i32.const 9136 call $~lib/string/String.__eq @@ -15820,16 +15828,16 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $1 @@ -15842,7 +15850,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.load offset=4 local.tee $1 i32.const 1 @@ -15876,9 +15884,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $60 + local.get $61 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $61 + local.tee $60 i32.load offset=12 i32.const 10 i32.ne @@ -15895,7 +15903,7 @@ i32.const 10 i32.lt_s if - local.get $61 + local.get $60 local.get $41 call $~lib/array/Array#__get local.get $41 @@ -15964,7 +15972,7 @@ i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $58 local.get $56 i32.load offset=12 i32.const 8 @@ -15981,7 +15989,7 @@ local.set $41 loop $for-loop|2 local.get $41 - local.get $57 + local.get $58 i32.load offset=12 i32.lt_s if @@ -15989,7 +15997,7 @@ local.get $41 call $~lib/array/Array#__get local.tee $0 - local.get $57 + local.get $58 local.get $41 call $~lib/array/Array#__get local.tee $1 @@ -16068,15 +16076,15 @@ call $~lib/rt/pure/__release local.get $40 call $~lib/rt/pure/__release - local.get $60 - call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index ec9173e528..8ddd031f06 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1612,7 +1612,7 @@ 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 @@ -1626,7 +1626,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $9 i32.eq if @@ -1641,10 +1641,9 @@ i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1828,17 +1827,19 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $3 + local.set $4 local.get $6 i32.load local.tee $1 i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $0 + local.set $3 + local.get $0 i32.const 1073741808 i32.gt_u - local.get $5 + local.get $0 local.get $1 i32.const 16 i32.sub @@ -1887,7 +1888,7 @@ local.get $1 i32.store offset=4 local.get $8 - local.get $5 + local.get $3 i32.store offset=8 local.get $9 call $~lib/rt/pure/__release @@ -1896,7 +1897,7 @@ local.get $6 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 0e80788972..bde92ba99b 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 $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) @@ -1111,6 +1111,83 @@ call $~lib/rt/pure/decrement end ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (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 $2 + i32.const 0 + i32.store8 + local.get $2 + i32.const 4 + i32.add + local.tee $1 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $1 + i32.const 0 + i32.store8 offset=2 + local.get $1 + i32.const 0 + i32.store8 offset=1 + local.get $2 + i32.const 0 + i32.store8 offset=3 + local.get $1 + i32.const 0 + i32.store8 + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.store offset=8 + local.get $0 + ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 @@ -1765,119 +1842,47 @@ i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $3 - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 - local.tee $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 4 - i32.add - local.tee $2 - i32.const 0 - i32.store8 offset=3 - local.get $0 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $0 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 - local.get $3 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $3 - end - local.get $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 $1 - local.set $0 - local.get $1 - local.get $3 - i32.load - local.tee $2 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $0 - i32.store - local.get $3 - local.get $1 - i32.store offset=4 - local.get $3 - i32.const 8 - i32.store offset=8 - local.get $3 i32.const 0 i32.const 246 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 1 i32.const 224 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 2 i32.const 88 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 3 i32.const 159 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 4 i32.const 130 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 5 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 6 i32.const 67 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 7 i32.const 95 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.load - local.get $3 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1891,7 +1896,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1905,7 +1910,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1919,7 +1924,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1933,7 +1938,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1947,7 +1952,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1961,7 +1966,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1975,7 +1980,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1989,7 +1994,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -2003,7 +2008,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -2017,7 +2022,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const 7936550095674706383278551e126 @@ -2030,7 +2035,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const -411777475818852546741639e241 @@ -2043,7 +2048,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const -10 @@ -2056,7 +2061,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getInt8 i32.const -32 @@ -2069,7 +2074,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/dataview/DataView#getInt8 i32.const 88 @@ -2082,7 +2087,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 call $~lib/dataview/DataView#getInt8 i32.const -97 @@ -2095,7 +2100,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 call $~lib/dataview/DataView#getInt8 i32.const -126 @@ -2108,7 +2113,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 call $~lib/dataview/DataView#getInt8 i32.const 101 @@ -2121,7 +2126,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 call $~lib/dataview/DataView#getInt8 i32.const 67 @@ -2134,7 +2139,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 7 call $~lib/dataview/DataView#getInt8 i32.const 95 @@ -2147,7 +2152,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2163,7 +2168,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2179,7 +2184,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2195,7 +2200,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2211,7 +2216,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2227,7 +2232,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2243,7 +2248,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2259,7 +2264,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2275,7 +2280,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2291,7 +2296,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2307,7 +2312,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2323,7 +2328,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2339,7 +2344,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2355,7 +2360,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2371,7 +2376,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2385,7 +2390,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2399,7 +2404,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2413,7 +2418,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2427,7 +2432,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2441,7 +2446,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2455,7 +2460,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2469,7 +2474,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2483,7 +2488,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2497,7 +2502,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2511,7 +2516,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const 6864441868736323830 @@ -2524,7 +2529,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const -657428103485373601 @@ -2537,7 +2542,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 246 @@ -2550,7 +2555,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getUint8 i32.const 224 @@ -2563,7 +2568,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/dataview/DataView#getUint8 i32.const 88 @@ -2576,7 +2581,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 call $~lib/dataview/DataView#getUint8 i32.const 159 @@ -2589,7 +2594,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 call $~lib/dataview/DataView#getUint8 i32.const 130 @@ -2602,7 +2607,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 call $~lib/dataview/DataView#getUint8 i32.const 101 @@ -2615,7 +2620,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 call $~lib/dataview/DataView#getUint8 i32.const 67 @@ -2628,7 +2633,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 7 call $~lib/dataview/DataView#getUint8 i32.const 95 @@ -2641,7 +2646,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2657,7 +2662,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2673,7 +2678,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2689,7 +2694,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2705,7 +2710,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2721,7 +2726,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2737,7 +2742,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2753,7 +2758,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2769,7 +2774,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2785,7 +2790,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2801,7 +2806,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2817,7 +2822,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2833,7 +2838,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2849,7 +2854,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2865,7 +2870,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2879,7 +2884,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2893,7 +2898,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2907,7 +2912,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2921,7 +2926,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2935,7 +2940,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2949,7 +2954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2963,7 +2968,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2977,7 +2982,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2991,7 +2996,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3005,7 +3010,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 @@ -3018,7 +3023,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 @@ -3031,11 +3036,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 f32.const 1.5976661625240943e-18 i32.const 1 call $~lib/dataview/DataView#setFloat32 - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -3049,11 +3054,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 f32.const 1976281973381696323584 i32.const 0 call $~lib/dataview/DataView#setFloat32 - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -3067,11 +3072,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 f64.const -1094252199637739024055454e124 i32.const 1 call $~lib/dataview/DataView#setFloat64 - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const -1094252199637739024055454e124 @@ -3084,11 +3089,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 f64.const 6.022586634778589e-103 i32.const 0 call $~lib/dataview/DataView#setFloat64 - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const 6.022586634778589e-103 @@ -3102,7 +3107,7 @@ unreachable end i32.const 0 - local.get $1 + local.get $0 i32.load offset=8 i32.ge_u if @@ -3113,11 +3118,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 i32.const 108 i32.store8 - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const 108 @@ -3130,11 +3135,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const -13360 i32.const 1 call $~lib/dataview/DataView#setInt16 - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -3150,11 +3155,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 14689 i32.const 0 call $~lib/dataview/DataView#setInt16 - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -3170,11 +3175,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1204680201 i32.const 1 call $~lib/dataview/DataView#setInt32 - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -3188,11 +3193,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 660673230 i32.const 0 call $~lib/dataview/DataView#setInt32 - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -3206,11 +3211,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i64.const -3290739641816099749 i32.const 1 call $~lib/dataview/DataView#setInt64 - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const -3290739641816099749 @@ -3223,11 +3228,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i64.const 8178932412950708047 i32.const 0 call $~lib/dataview/DataView#setInt64 - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const 8178932412950708047 @@ -3241,7 +3246,7 @@ unreachable end i32.const 0 - local.get $1 + local.get $0 i32.load offset=8 i32.ge_u if @@ -3252,11 +3257,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 i32.const 238 i32.store8 - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 238 @@ -3269,11 +3274,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 58856 i32.const 1 call $~lib/dataview/DataView#setUint16 - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -3289,11 +3294,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 60400 i32.const 0 call $~lib/dataview/DataView#setUint16 - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -3309,11 +3314,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const -846805744 i32.const 1 call $~lib/dataview/DataView#setUint32 - local.get $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -3327,11 +3332,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const -1510791631 i32.const 0 call $~lib/dataview/DataView#setUint32 - local.get $1 + local.get $0 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3345,11 +3350,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i64.const 2334704782995986958 i32.const 1 call $~lib/dataview/DataView#setUint64 - local.get $1 + local.get $0 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 @@ -3362,11 +3367,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i64.const -7123186897289856329 i32.const 0 call $~lib/dataview/DataView#setUint64 - local.get $1 + local.get $0 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 @@ -3379,21 +3384,21 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.load - local.tee $0 + local.tee $3 i32.const 16 i32.sub i32.load offset=12 local.set $2 - local.get $0 + local.get $3 i32.const 0 local.get $2 call $~lib/dataview/DataView#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $2 local.get $0 + call $~lib/rt/pure/__release + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -3403,7 +3408,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=8 i32.const 8 i32.ne @@ -3415,9 +3420,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 0783e5e9da..5565cf2e2d 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3115,10 +3115,8 @@ i32.store offset=20 local.get $0 call $~lib/map/Map#clear - local.get $0 - local.set $1 loop $for-loop|1 - local.get $7 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3126,8 +3124,8 @@ i32.const 100 i32.lt_s if + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has if i32.const 0 @@ -3137,9 +3135,9 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 local.get $1 - local.get $7 - local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3148,8 +3146,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3160,10 +3158,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3179,14 +3177,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.const 1 i32.add - local.set $7 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3199,9 +3197,9 @@ unreachable end i32.const 0 - local.set $7 + local.set $1 loop $for-loop|3 - local.get $7 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3209,8 +3207,8 @@ i32.const 100 i32.lt_s if + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3221,10 +3219,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3240,9 +3238,9 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 local.get $1 - local.get $7 - local.get $7 i32.const 24 i32.shl i32.const 24 @@ -3251,8 +3249,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -3263,10 +3261,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3282,14 +3280,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.const 1 i32.add - local.set $7 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3301,46 +3299,46 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#keys - local.set $7 - local.get $1 + local.set $4 + local.get $0 call $~lib/map/Map#values - local.set $3 + local.set $6 i32.const 24 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $5 loop $for-loop|4 - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=12 i32.ge_u if @@ -3351,18 +3349,18 @@ call $~lib/builtins/abort unreachable end - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=4 i32.add i32.load8_s - local.set $5 - local.get $3 + local.set $1 local.get $6 + local.get $2 call $~lib/array/Array#__get - local.set $2 + local.set $7 + local.get $0 local.get $1 - local.get $5 call $~lib/map/Map#has i32.eqz if @@ -3373,8 +3371,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $0 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -3387,27 +3385,27 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - local.get $5 + local.get $3 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $2 + local.get $5 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3419,7 +3417,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -3432,9 +3430,9 @@ unreachable end i32.const 0 - local.set $6 + local.set $2 loop $for-loop|6 - local.get $6 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3442,8 +3440,8 @@ i32.const 50 i32.lt_s if - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3454,10 +3452,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $6 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3473,11 +3471,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3487,14 +3485,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3507,9 +3505,9 @@ unreachable end i32.const 0 - local.set $6 + local.set $2 loop $for-loop|8 - local.get $6 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3517,8 +3515,8 @@ i32.const 50 i32.lt_s if - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3528,9 +3526,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 - local.get $6 + local.get $0 + local.get $2 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3539,8 +3537,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3551,11 +3549,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3565,14 +3563,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3584,9 +3582,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 @@ -3596,15 +3594,15 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + 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#has (param $0 i32) (param $1 i32) (result i32) @@ -4338,17 +4336,15 @@ i32.store offset=20 local.get $0 call $~lib/map/Map#clear - local.get $0 - local.set $1 loop $for-loop|1 - local.get $7 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has if i32.const 0 @@ -4358,17 +4354,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 local.get $1 - local.get $7 - local.get $7 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4379,10 +4375,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 255 i32.and i32.const 10 @@ -4396,14 +4392,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.const 1 i32.add - local.set $7 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4416,16 +4412,16 @@ unreachable end i32.const 0 - local.set $7 + local.set $1 loop $for-loop|3 - local.get $7 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4436,10 +4432,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 255 i32.and i32.const 10 @@ -4453,17 +4449,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 local.get $1 - local.get $7 - local.get $7 i32.const 255 i32.and i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#has i32.eqz if @@ -4474,10 +4470,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $1 - local.get $7 call $~lib/map/Map#get - local.get $7 + local.get $1 i32.const 255 i32.and i32.const 20 @@ -4491,14 +4487,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.const 1 i32.add - local.set $7 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4510,46 +4506,46 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#keys - local.set $7 - local.get $1 + local.set $4 + local.get $0 call $~lib/map/Map#values - local.set $3 + local.set $6 i32.const 24 i32.const 10 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $5 loop $for-loop|4 - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=12 i32.ge_u if @@ -4560,18 +4556,18 @@ call $~lib/builtins/abort unreachable end - local.get $6 - local.get $7 + local.get $2 + local.get $4 i32.load offset=4 i32.add i32.load8_u - local.set $5 - local.get $3 + local.set $1 local.get $6 + local.get $2 call $~lib/array/Array#__get - local.set $2 + local.set $7 + local.get $0 local.get $1 - local.get $5 call $~lib/map/Map#has i32.eqz if @@ -4582,8 +4578,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $0 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -4596,27 +4592,27 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - local.get $5 + local.get $3 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $2 + local.get $5 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4628,7 +4624,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -4641,16 +4637,16 @@ unreachable end i32.const 0 - local.set $6 + local.set $2 loop $for-loop|6 - local.get $6 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4661,10 +4657,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $6 + local.get $2 i32.const 255 i32.and i32.const 20 @@ -4678,11 +4674,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4692,14 +4688,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4712,16 +4708,16 @@ unreachable end i32.const 0 - local.set $6 + local.set $2 loop $for-loop|8 - local.get $6 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4731,17 +4727,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 - local.get $6 + 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 $6 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4752,11 +4748,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 - local.get $6 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4766,14 +4762,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 1 i32.add - local.set $6 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4785,9 +4781,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 @@ -4797,15 +4793,15 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + 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/util/hash/hash16 (param $0 i32) (result i32) @@ -5642,28 +5638,28 @@ i32.const 11 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.const 0 i32.store - local.get $2 + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 0 i32.store offset=8 - local.get $2 + local.get $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $0 i32.const 0 i32.store offset=16 - local.get $2 + local.get $0 i32.const 0 i32.store offset=20 - local.get $2 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $3 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5671,8 +5667,8 @@ i32.const 100 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -5682,9 +5678,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 - local.get $3 + local.get $0 + local.get $1 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5693,8 +5689,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5705,10 +5701,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5724,14 +5720,14 @@ 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 $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5744,9 +5740,9 @@ unreachable end i32.const 0 - local.set $3 + local.set $1 loop $for-loop|3 - local.get $3 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5754,8 +5750,8 @@ i32.const 100 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5766,10 +5762,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5785,9 +5781,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 - local.get $3 + local.get $0 + local.get $1 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5796,8 +5792,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5808,10 +5804,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5827,14 +5823,14 @@ 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|3 end end - local.get $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5846,10 +5842,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/map/Map#keys local.set $4 - local.get $2 + local.get $0 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -5879,13 +5875,12 @@ call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 - local.get $0 + local.get $2 local.get $4 i32.load offset=12 i32.lt_s if - local.get $0 - local.tee $1 + local.get $2 local.get $4 i32.load offset=12 i32.ge_u @@ -5899,18 +5894,18 @@ end local.get $4 i32.load offset=4 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s - local.set $0 + local.set $1 local.get $6 - local.get $1 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5921,7 +5916,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -5936,22 +5931,22 @@ unreachable end local.get $3 - local.get $0 - local.get $0 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end @@ -5980,9 +5975,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 @@ -5990,8 +5985,8 @@ i32.const 50 i32.lt_s if - local.get $2 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -6002,10 +5997,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 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 @@ -6021,11 +6016,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 - call $~lib/map/Map#delete local.get $2 + call $~lib/map/Map#delete local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6035,14 +6030,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 $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6055,9 +6050,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 @@ -6065,8 +6060,8 @@ i32.const 50 i32.lt_s if - local.get $2 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6076,9 +6071,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -6087,8 +6082,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -6099,11 +6094,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 - call $~lib/map/Map#delete local.get $2 + call $~lib/map/Map#delete local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6113,14 +6108,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 $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6132,9 +6127,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/map/Map#clear - local.get $2 + local.get $0 i32.load offset=20 if i32.const 0 @@ -6152,7 +6147,7 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) @@ -6871,35 +6866,35 @@ i32.const 14 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.const 0 i32.store - local.get $2 + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 0 i32.store offset=8 - local.get $2 + local.get $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $0 i32.const 0 i32.store offset=16 - local.get $2 + local.get $0 i32.const 0 i32.store offset=20 - local.get $2 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $3 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -6909,17 +6904,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 - local.get $3 + 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 $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -6930,10 +6925,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 65535 i32.and i32.const 10 @@ -6947,14 +6942,14 @@ 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 $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -6967,16 +6962,16 @@ unreachable end i32.const 0 - local.set $3 + local.set $1 loop $for-loop|3 - local.get $3 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -6987,10 +6982,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 65535 i32.and i32.const 10 @@ -7004,17 +6999,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 - local.get $3 + 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 $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7025,10 +7020,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 + local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $3 + local.get $1 i32.const 65535 i32.and i32.const 20 @@ -7042,14 +7037,14 @@ 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|3 end end - local.get $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7061,10 +7056,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/map/Map#keys local.set $4 - local.get $2 + local.get $0 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -7094,13 +7089,12 @@ call $~lib/map/Map#constructor local.set $5 loop $for-loop|4 - local.get $0 + local.get $2 local.get $4 i32.load offset=12 i32.lt_s if - local.get $0 - local.tee $1 + local.get $2 local.get $4 i32.load offset=12 i32.ge_u @@ -7114,18 +7108,18 @@ end local.get $4 i32.load offset=4 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.set $0 + local.set $1 local.get $6 - local.get $1 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7136,7 +7130,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -7151,22 +7145,22 @@ unreachable end local.get $3 - local.get $0 - local.get $0 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end @@ -7195,16 +7189,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 $2 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7215,10 +7209,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 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 @@ -7232,11 +7226,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 - call $~lib/map/Map#delete local.get $2 + call $~lib/map/Map#delete local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7246,14 +7240,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 $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7266,16 +7260,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 $2 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7285,17 +7279,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 - 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 $2 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7306,11 +7300,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 - call $~lib/map/Map#delete local.get $2 + call $~lib/map/Map#delete local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7320,14 +7314,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 $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7339,9 +7333,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/map/Map#clear - local.get $2 + local.get $0 i32.load offset=20 if i32.const 0 @@ -7359,7 +7353,7 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index fd042e4d92..4d9da2466b 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1568,10 +1568,10 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.tee $3 + local.tee $4 i32.const 268435455 i32.and - local.set $1 + local.set $2 local.get $0 call $~lib/rt/rtrace/ondecrement local.get $0 @@ -1586,7 +1586,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.eq if @@ -1613,8 +1613,8 @@ br $__inlined_func$~lib/rt/__visit_members end local.get $1 - local.get $1 local.tee $2 + local.get $2 i32.const 16 i32.sub i32.load offset=12 @@ -1627,9 +1627,9 @@ if local.get $2 i32.load - local.tee $4 + local.tee $3 if - local.get $4 + local.get $3 call $~lib/rt/pure/__visit end local.get $2 @@ -1643,7 +1643,7 @@ end unreachable end - local.get $3 + local.get $4 i32.const -2147483648 i32.and if @@ -1666,7 +1666,7 @@ local.get $0 call $~lib/rt/rtrace/onfree else - local.get $1 + local.get $2 i32.const 0 i32.le_u if @@ -1678,10 +1678,10 @@ unreachable end local.get $0 - local.get $1 + local.get $2 i32.const 1 i32.sub - local.get $3 + local.get $4 i32.const -268435456 i32.and i32.or From ffc70722478e100a074b9dbdaf941eedd337c0dc Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 08:13:08 +0300 Subject: [PATCH 10/34] add vacuum after rse --- cli/asc.js | 1 + tests/compiler/do.optimized.wat | 102 +-- tests/compiler/std/array.optimized.wat | 1138 ++++++++++++------------ 3 files changed, 617 insertions(+), 624 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 3efef469e9..cb80555fbe 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -709,6 +709,7 @@ exports.main = function main(argv, options, callback) { } if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); + add("vacuum"); } if (hasARC) { // differs if (optimizeLevel < 3) { diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 4490037fce..d7d4c2c3ed 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1050,19 +1050,19 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $0 + local.set $1 loop $do-continue|0 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 br_if $do-continue|0 end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1071,7 +1071,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1087,17 +1087,17 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $1 + local.set $0 loop $do-continue|00 - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $1 - local.get $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 @@ -1127,14 +1127,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|001 + loop $do-continue|01 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|001 + br_if $do-continue|01 end local.get $1 i32.const 10 @@ -1151,14 +1151,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|01 + loop $do-continue|02 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|01 + br_if $do-continue|02 end local.get $1 i32.const 10 @@ -1187,14 +1187,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|02 + loop $do-continue|03 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-continue|03 end local.get $1 i32.const 10 @@ -1212,30 +1212,30 @@ 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 0 + local.set $1 + loop $do-continue|04 + local.get $0 i32.const 1 i32.add - local.tee $1 + local.tee $0 i32.const 10 i32.ne if loop $do-continue|1 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.rem_s br_if $do-continue|1 end - br $do-continue|03 + br $do-continue|04 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1246,7 +1246,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 90 i32.ne if @@ -1262,8 +1262,8 @@ i32.const 0 global.set $do/ran call $do/Ref#constructor - local.set $1 - loop $do-continue|04 + local.set $0 + loop $do-continue|05 local.get $2 i32.const 1 i32.add @@ -1272,21 +1272,21 @@ 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 $do/Ref#constructor - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end - local.get $0 - local.tee $1 - br_if $do-continue|04 + local.get $1 + local.tee $0 + br_if $do-continue|05 end local.get $2 i32.const 10 @@ -1299,7 +1299,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1310,7 +1310,7 @@ end i32.const 1 global.set $do/ran - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $do/ran i32.eqz @@ -1327,8 +1327,8 @@ i32.const 0 local.set $2 call $do/Ref#constructor - local.set $1 - loop $do-continue|05 + local.set $0 + loop $do-continue|06 block $do-break|0 local.get $2 i32.const 1 @@ -1337,20 +1337,20 @@ i32.const 10 i32.eq if - local.get $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 - local.set $1 + local.set $0 br $do-break|0 end call $do/Ref#constructor - local.tee $0 + local.tee $1 call $~lib/rt/pure/__release - local.get $0 - br_if $do-continue|05 + local.get $1 + br_if $do-continue|06 end end local.get $2 @@ -1364,7 +1364,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1375,7 +1375,7 @@ end i32.const 1 global.set $do/ran - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $do/ran i32.eqz diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index c3fe59c202..e6c47b3c95 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -5549,86 +5549,6 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 1600 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 1600 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 16 - 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 $0 - local.set $1 - local.get $0 - local.get $2 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 1600 - i32.store offset=8 - local.get $2 - i32.const 400 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 400 - i32.lt_s - if - local.get $2 - local.get $3 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9644,9 +9564,9 @@ (local $25 i32) (local $26 i32) (local $27 i32) - (local $28 i32) - (local $29 f64) - (local $30 f32) + (local $28 f64) + (local $29 f32) + (local $30 i32) (local $31 i32) (local $32 i32) (local $33 i32) @@ -9657,13 +9577,13 @@ (local $38 i32) (local $39 i32) (local $40 i32) - (local $41 i32) - (local $42 f64) + (local $41 f64) + (local $42 i32) (local $43 i32) (local $44 i32) (local $45 i32) - (local $46 i32) - (local $47 f32) + (local $46 f32) + (local $47 i32) (local $48 i32) (local $49 i32) (local $50 i32) @@ -9687,7 +9607,7 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $61 + local.set $59 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -9695,44 +9615,44 @@ i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $61 + local.get $59 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $61 + local.set $59 end - local.get $61 + local.get $59 i32.const 0 i32.store - local.get $61 + local.get $59 i32.const 0 i32.store offset=4 - local.get $61 + local.get $59 i32.const 0 i32.store offset=8 local.get $1 local.tee $0 - local.get $61 + local.get $59 i32.load - local.tee $59 + local.tee $60 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $59 + local.get $60 call $~lib/rt/pure/__release end - local.get $61 + local.get $59 local.get $0 i32.store - local.get $61 + local.get $59 local.get $1 i32.store offset=4 - local.get $61 + local.get $59 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9746,7 +9666,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $61 + local.get $59 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9754,20 +9674,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 call $std/array/isArraysEqual i32.eqz if @@ -9778,20 +9698,20 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 call $std/array/isArraysEqual i32.eqz if @@ -9802,20 +9722,20 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 0 i32.const 6 i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 call $std/array/isArraysEqual i32.eqz if @@ -9826,13 +9746,13 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 0 i32.const 6 @@ -9850,13 +9770,13 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 0 i32.const 6 @@ -9874,14 +9794,14 @@ call $~lib/builtins/abort unreachable end + local.get $57 + call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $1 @@ -9892,20 +9812,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9917,20 +9837,20 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9942,20 +9862,20 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9967,13 +9887,13 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 7 @@ -9992,13 +9912,13 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $58 + local.get $57 i32.const 5 i32.const 2 i32.const 7 @@ -10017,14 +9937,14 @@ call $~lib/builtins/abort unreachable end + local.get $57 + call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $1 @@ -10288,7 +10208,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.load offset=4 local.tee $1 i32.const 0 @@ -10298,13 +10218,13 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $59 + local.get $60 i32.load offset=12 local.tee $1 i32.const 0 i32.gt_s if - local.get $59 + local.get $60 i32.load offset=4 local.tee $0 local.get $1 @@ -10325,14 +10245,14 @@ br_if $do-continue|0 end else - local.get $59 + local.get $60 i32.const 0 call $~lib/array/ensureSize end - local.get $59 + local.get $60 i32.const 0 i32.store offset=12 - local.get $59 + local.get $60 i32.load offset=12 if i32.const 0 @@ -10342,13 +10262,13 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $60 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $60 + local.set $61 global.get $std/array/arr - local.get $60 + local.get $61 call $~lib/array/Array#concat local.set $0 global.get $std/array/arr @@ -10448,16 +10368,16 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.const 46 call $~lib/array/Array#push - local.get $60 + local.get $61 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $60 + local.get $61 call $~lib/array/Array#concat - local.set $61 + local.set $58 local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr @@ -10472,7 +10392,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.load offset=12 i32.const 2 i32.ne @@ -10484,7 +10404,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.load offset=12 i32.const 5 i32.ne @@ -10496,7 +10416,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10509,7 +10429,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10522,7 +10442,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10535,7 +10455,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10548,7 +10468,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10561,10 +10481,10 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 call $~lib/array/Array#pop drop - local.get $61 + local.get $58 i32.load offset=12 i32.const 4 i32.ne @@ -10582,7 +10502,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.load offset=12 if i32.const 0 @@ -10592,11 +10512,11 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $60 global.get $std/array/arr call $~lib/array/Array#concat local.set $0 - local.get $61 + local.get $58 call $~lib/rt/pure/__release local.get $0 i32.load offset=12 @@ -10610,7 +10530,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $60 i32.load offset=12 if i32.const 0 @@ -10620,13 +10540,13 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10639,14 +10559,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $39 + local.tee $38 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10672,14 +10592,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $37 + local.tee $36 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10737,14 +10657,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $52 + local.tee $51 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10769,14 +10689,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $53 + local.tee $52 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10801,14 +10721,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $49 + local.tee $48 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10833,14 +10753,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $46 + local.tee $45 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10865,14 +10785,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $44 + local.tee $43 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10897,7 +10817,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $57 + local.tee $59 i32.const 5 i32.const 2 i32.const 3 @@ -10929,14 +10849,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $58 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10962,14 +10882,14 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $60 + local.tee $61 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10987,10 +10907,10 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $40 + local.set $39 local.get $0 call $~lib/rt/pure/__release - local.get $40 + local.get $39 i32.const -4 i32.const -3 i32.const 2147483647 @@ -11014,8 +10934,6 @@ call $~lib/builtins/abort unreachable end - local.get $40 - call $~lib/rt/pure/__release local.get $39 call $~lib/rt/pure/__release local.get $38 @@ -11024,23 +10942,23 @@ call $~lib/rt/pure/__release local.get $36 call $~lib/rt/pure/__release + local.get $35 + call $~lib/rt/pure/__release local.get $55 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $46 + local.get $47 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -11048,18 +10966,20 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $57 + local.get $42 + call $~lib/rt/pure/__release + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $1 @@ -11236,7 +11156,7 @@ unreachable end global.get $std/array/arr - local.tee $60 + local.tee $61 i32.load offset=12 local.tee $1 i32.const 1 @@ -11249,12 +11169,12 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $61 i32.load offset=4 - local.tee $61 + local.tee $58 i32.load - local.get $61 - local.get $61 + local.get $58 + local.get $58 i32.const 4 i32.add local.get $1 @@ -11266,11 +11186,11 @@ local.tee $1 call $~lib/memory/memory.copy local.get $1 - local.get $61 + local.get $58 i32.add i32.const 0 i32.store - local.get $60 + local.get $61 local.get $0 i32.store offset=12 global.set $std/array/i @@ -11439,14 +11359,14 @@ unreachable end global.get $std/array/arr - local.tee $59 + local.tee $60 i32.load offset=12 local.tee $1 if - local.get $59 + local.get $60 i32.load offset=4 local.set $0 - local.get $59 + local.get $60 i32.load offset=4 local.get $1 i32.const 1 @@ -11454,30 +11374,30 @@ i32.const 2 i32.shl i32.add - local.set $61 + local.set $59 loop $while-continue|0 local.get $0 - local.get $61 + local.get $59 i32.lt_u if local.get $0 i32.load local.set $1 local.get $0 - local.get $61 + local.get $59 i32.load i32.store - local.get $61 + local.get $59 local.get $1 i32.store local.get $0 i32.const 4 i32.add local.set $0 - local.get $61 + local.get $59 i32.const 4 i32.sub - local.set $61 + local.set $59 br $while-continue|0 end end @@ -11715,17 +11635,17 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 local.set $1 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $58 + local.get $57 i32.load offset=12 - local.tee $60 + local.tee $61 if (result i32) i32.const 0 - local.get $60 + local.get $61 i32.ge_s else i32.const 1 @@ -11740,7 +11660,7 @@ local.set $1 loop $while-continue|022 local.get $0 - local.get $60 + local.get $61 i32.lt_s if local.get $1 @@ -11779,17 +11699,17 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 local.set $1 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $61 + local.get $58 i32.load offset=12 - local.tee $60 + local.tee $61 if (result i32) i32.const 0 - local.get $60 + local.get $61 i32.ge_s else i32.const 1 @@ -11804,7 +11724,7 @@ local.set $1 loop $while-continue|023 local.get $0 - local.get $60 + local.get $61 i32.lt_s if local.get $1 @@ -11837,9 +11757,9 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $57 call $~lib/rt/pure/__release - local.get $61 + local.get $58 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11989,10 +11909,10 @@ call $~lib/rt/pure/__retain local.tee $58 i32.load offset=12 - local.tee $60 + local.tee $61 if (result i32) i32.const 0 - local.get $60 + local.get $61 i32.ge_s else i32.const 1 @@ -12004,7 +11924,7 @@ local.set $1 loop $while-continue|024 local.get $0 - local.get $60 + local.get $61 i32.lt_s if i32.const 1 @@ -12014,14 +11934,14 @@ i32.shl i32.add f32.load - local.tee $47 + local.tee $46 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $47 - local.get $47 + local.get $46 + local.get $46 f32.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -12046,7 +11966,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $0 + local.set $59 i32.const 0 i32.const 1 i32.const 3 @@ -12070,33 +11990,33 @@ i32.load offset=4 local.set $1 loop $while-continue|025 - local.get $0 + local.get $59 local.get $60 i32.lt_s if i32.const 1 local.get $1 - local.get $0 + local.get $59 i32.const 3 i32.shl i32.add f64.load - local.tee $42 + local.tee $41 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $42 - local.get $42 + local.get $41 + local.get $41 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $59 i32.const 1 i32.add - local.set $0 + local.set $59 br $while-continue|025 end end @@ -12540,7 +12460,7 @@ i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12559,7 +12479,7 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $32 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12583,14 +12503,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $40 + local.tee $39 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12609,7 +12529,7 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12633,14 +12553,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $37 + local.tee $36 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12690,7 +12610,7 @@ i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12709,7 +12629,7 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12734,14 +12654,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $53 + local.tee $52 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12760,7 +12680,7 @@ i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12785,14 +12705,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $48 + local.tee $47 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12811,7 +12731,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12829,21 +12749,21 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $28 + local.set $27 local.get $0 call $~lib/rt/pure/__release - local.get $28 + local.get $27 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $44 + local.tee $43 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12855,14 +12775,14 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 i32.const 5 i32.const 2 i32.const 3 i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12909,37 +12829,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $34 i32.load offset=4 - local.tee $59 + local.tee $60 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $59 + local.get $60 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $59 + local.get $60 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $59 + local.get $60 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $59 + local.get $60 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 local.get $0 call $~lib/rt/pure/__release - local.get $35 + local.get $34 i32.const 2 call $~lib/array/Array#splice - local.set $31 + local.set $30 local.get $1 call $~lib/rt/pure/__release - local.get $31 + local.get $30 i32.load offset=12 i32.const 2 i32.ne @@ -12951,7 +12871,7 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $30 i32.const 0 call $~lib/array/Array#__get local.tee $56 @@ -12966,10 +12886,10 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $30 i32.const 1 call $~lib/array/Array#__get - local.tee $58 + local.tee $57 i32.load i32.const 4 i32.ne @@ -12981,7 +12901,7 @@ call $~lib/builtins/abort unreachable end - local.get $35 + local.get $34 i32.load offset=12 i32.const 3 i32.ne @@ -12993,10 +12913,10 @@ call $~lib/builtins/abort unreachable end - local.get $35 + local.get $34 i32.const 0 call $~lib/array/Array#__get - local.tee $61 + local.tee $58 i32.load i32.const 1 i32.ne @@ -13008,10 +12928,10 @@ call $~lib/builtins/abort unreachable end - local.get $35 + local.get $34 i32.const 1 call $~lib/array/Array#__get - local.tee $60 + local.tee $61 i32.load i32.const 2 i32.ne @@ -13023,10 +12943,10 @@ call $~lib/builtins/abort unreachable end - local.get $35 + local.get $34 i32.const 2 call $~lib/array/Array#__get - local.tee $59 + local.tee $60 i32.load i32.const 5 i32.ne @@ -13044,7 +12964,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $31 i32.load offset=4 local.tee $1 i32.const 1 @@ -13057,9 +12977,9 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $32 + local.get $31 call $~lib/array/Array#splice - local.tee $27 + local.tee $26 i32.load offset=12 i32.const 1 i32.ne @@ -13071,11 +12991,11 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $26 i32.const 0 call $~lib/array/Array#__get - local.tee $26 - local.get $26 + local.tee $25 + local.get $25 i32.eqz if i32.const 0 @@ -13096,7 +13016,7 @@ call $~lib/builtins/abort unreachable end - local.get $32 + local.get $31 i32.load offset=12 i32.const 2 i32.ne @@ -13108,7 +13028,7 @@ call $~lib/builtins/abort unreachable end - local.get $32 + local.get $31 i32.const 0 call $~lib/array/Array#__get local.tee $0 @@ -13120,11 +13040,11 @@ call $~lib/builtins/abort unreachable end - local.get $32 + local.get $31 i32.const 1 call $~lib/array/Array#__get - local.tee $25 - local.get $25 + local.tee $24 + local.get $24 i32.eqz if i32.const 0 @@ -13145,7 +13065,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $27 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release @@ -13191,11 +13111,9 @@ call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $34 - call $~lib/rt/pure/__release local.get $33 call $~lib/rt/pure/__release - local.get $40 + local.get $32 call $~lib/rt/pure/__release local.get $39 call $~lib/rt/pure/__release @@ -13205,23 +13123,23 @@ call $~lib/rt/pure/__release local.get $36 call $~lib/rt/pure/__release + local.get $35 + call $~lib/rt/pure/__release local.get $55 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release - local.get $52 - call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release - local.get $53 - call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $46 + local.get $47 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -13229,23 +13147,25 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $57 + local.get $42 + call $~lib/rt/pure/__release + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release - local.get $26 + local.get $25 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $25 + local.get $24 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -13719,17 +13639,17 @@ unreachable end loop $for-loop|0 - local.get $24 + local.get $53 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $24 + local.get $53 i32.const 1 i32.add - local.set $24 + local.set $53 br $for-loop|0 end end @@ -13746,7 +13666,7 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $0 + local.set $59 global.get $std/array/arr local.tee $61 i32.load offset=12 @@ -13758,9 +13678,9 @@ call $~lib/rt/pure/__retain local.tee $58 i32.load offset=4 - local.set $59 + local.set $0 loop $for-loop|043 - local.get $0 + local.get $59 local.get $60 local.get $61 i32.load offset=12 @@ -13771,7 +13691,7 @@ select i32.lt_s if - local.get $0 + local.get $59 i32.const 2 i32.shl local.tee $1 @@ -13780,16 +13700,16 @@ i32.add i32.load f32.convert_i32_s - local.set $47 + local.set $46 + local.get $0 local.get $1 - local.get $59 i32.add - local.get $47 + local.get $46 f32.store - local.get $0 + local.get $59 i32.const 1 i32.add - local.set $0 + local.set $59 br $for-loop|043 end end @@ -14342,7 +14262,7 @@ call $~lib/rt/pure/__retain local.tee $55 i32.load offset=12 - local.tee $59 + local.tee $60 i32.const 1 i32.le_s if @@ -14352,51 +14272,51 @@ end local.get $55 i32.load offset=4 - local.set $60 - local.get $59 + local.set $61 + local.get $60 i32.const 2 i32.eq if - local.get $60 + local.get $61 f32.load offset=4 - local.tee $30 - local.get $60 + local.tee $29 + local.get $61 f32.load - local.tee $47 + local.tee $46 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $60 - local.get $47 + local.get $61 + local.get $46 f32.store offset=4 - local.get $60 - local.get $30 + local.get $61 + local.get $29 f32.store end local.get $55 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $59 + local.get $60 i32.const 256 i32.lt_s if i32.const 0 - local.set $61 + local.set $58 loop $for-loop|00 - local.get $61 - local.get $59 + local.get $58 + local.get $60 i32.lt_s if - local.get $60 local.get $61 + local.get $58 i32.const 2 i32.shl i32.add f32.load - local.set $30 - local.get $61 + local.set $29 + local.get $58 i32.const 1 i32.sub local.set $0 @@ -14405,14 +14325,14 @@ i32.const 0 i32.ge_s if - local.get $30 - local.get $60 + local.get $29 + local.get $61 local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $47 + local.tee $46 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -14422,38 +14342,38 @@ i32.const 1 i32.sub local.set $0 - local.get $60 + local.get $61 local.get $1 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $47 + local.get $46 f32.store br $while-continue|1 end end end - local.get $60 + local.get $61 local.get $0 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $30 + local.get $29 f32.store - local.get $61 + local.get $58 i32.const 1 i32.add - local.set $61 + local.set $58 br $for-loop|00 end end else + local.get $61 local.get $60 - local.get $59 call $~lib/util/sort/weakHeapSort end local.get $55 @@ -14467,41 +14387,41 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $51 + local.set $50 i32.const 0 - local.set $57 + local.set $59 i32.const 0 local.get $55 i32.load offset=12 local.tee $1 - local.get $51 + local.get $50 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $51 + local.get $50 local.get $55 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|001 - local.get $57 + local.get $59 local.get $1 i32.lt_s if local.get $55 - local.get $57 + local.get $59 call $~lib/array/Array#__get - local.tee $47 - local.get $47 + local.tee $46 + local.get $46 f32.ne if (result i32) - local.get $51 - local.get $57 + local.get $50 + local.get $59 call $~lib/array/Array#__get - local.tee $47 - local.get $47 + local.tee $46 + local.get $46 f32.ne else i32.const 0 @@ -14510,19 +14430,19 @@ if i32.const 0 local.get $55 - local.get $57 + local.get $59 call $~lib/array/Array#__get - local.get $51 - local.get $57 + local.get $50 + local.get $59 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $57 + local.get $59 i32.const 1 i32.add - local.set $57 + local.set $59 br $for-loop|001 end end @@ -14546,7 +14466,7 @@ call $~lib/rt/pure/__retain local.tee $54 i32.load offset=12 - local.tee $59 + local.tee $60 i32.const 1 i32.le_s if @@ -14556,51 +14476,51 @@ end local.get $54 i32.load offset=4 - local.set $60 - local.get $59 + local.set $61 + local.get $60 i32.const 2 i32.eq if - local.get $60 + local.get $61 f64.load offset=8 - local.tee $29 - local.get $60 + local.tee $28 + local.get $61 f64.load - local.tee $42 + local.tee $41 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $60 - local.get $42 + local.get $61 + local.get $41 f64.store offset=8 - local.get $60 - local.get $29 + local.get $61 + local.get $28 f64.store end local.get $54 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $59 + local.get $60 i32.const 256 i32.lt_s if i32.const 0 - local.set $61 + local.set $58 loop $for-loop|02 - local.get $61 - local.get $59 + local.get $58 + local.get $60 i32.lt_s if - local.get $60 local.get $61 + local.get $58 i32.const 3 i32.shl i32.add f64.load - local.set $29 - local.get $61 + local.set $28 + local.get $58 i32.const 1 i32.sub local.set $0 @@ -14609,14 +14529,14 @@ i32.const 0 i32.ge_s if - local.get $29 - local.get $60 + local.get $28 + local.get $61 local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $42 + local.tee $41 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -14626,38 +14546,38 @@ i32.const 1 i32.sub local.set $0 - local.get $60 + local.get $61 local.get $1 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $42 + local.get $41 f64.store br $while-continue|13 end end end - local.get $60 + local.get $61 local.get $0 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $29 + local.get $28 f64.store - local.get $61 + local.get $58 i32.const 1 i32.add - local.set $61 + local.set $58 br $for-loop|02 end end else + local.get $61 local.get $60 - local.get $59 call $~lib/util/sort/weakHeapSort end local.get $54 @@ -14671,41 +14591,41 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $52 i32.const 0 - local.set $61 + local.set $53 i32.const 0 local.get $54 i32.load offset=12 local.tee $1 - local.get $53 + local.get $52 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $53 + local.get $52 local.get $54 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 - local.get $61 + local.get $53 local.get $1 i32.lt_s if local.get $54 - local.get $61 + local.get $53 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $41 + local.get $41 f64.ne if (result i32) + local.get $52 local.get $53 - local.get $61 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $41 + local.get $41 f64.ne else i32.const 0 @@ -14714,19 +14634,19 @@ if i32.const 0 local.get $54 - local.get $61 + local.get $53 call $~lib/array/Array#__get + local.get $52 local.get $53 - local.get $61 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $61 + local.get $53 i32.const 1 i32.add - local.set $61 + local.set $53 br $for-loop|01 end end @@ -14747,18 +14667,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $59 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $57 + local.get $59 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14787,7 +14707,7 @@ i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14805,57 +14725,57 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $57 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $50 + local.set $49 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $49 + local.set $48 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $48 + local.set $47 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 + local.set $51 i32.const 64 call $std/array/createReverseOrderedArray - local.set $46 + local.set $45 i32.const 128 call $std/array/createReverseOrderedArray - local.set $45 + local.set $44 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $44 + local.set $43 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $43 + local.set $42 i32.const 512 call $std/array/createRandomOrderedArray - local.set $61 - local.get $58 + local.set $58 + local.get $57 i32.const 48 call $std/array/assertSorted - local.get $50 + local.get $49 i32.const 48 call $std/array/assertSorted - local.get $50 + local.get $49 i32.const 1 i32.const 2 i32.const 3 @@ -14874,10 +14794,10 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $48 i32.const 48 call $std/array/assertSorted - local.get $49 + local.get $48 i32.const 2 i32.const 2 i32.const 3 @@ -14896,11 +14816,11 @@ call $~lib/builtins/abort unreachable end - local.get $48 + local.get $47 i32.const 48 call $std/array/assertSorted - local.get $48 - local.get $52 + local.get $47 + local.get $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14912,11 +14832,11 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $45 i32.const 48 call $std/array/assertSorted - local.get $46 - local.get $52 + local.get $45 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14928,11 +14848,11 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $44 i32.const 48 call $std/array/assertSorted - local.get $45 - local.get $52 + local.get $44 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14944,11 +14864,11 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $43 i32.const 48 call $std/array/assertSorted - local.get $44 - local.get $52 + local.get $43 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14960,11 +14880,11 @@ call $~lib/builtins/abort unreachable end - local.get $43 + local.get $42 i32.const 48 call $std/array/assertSorted - local.get $43 - local.get $52 + local.get $42 + local.get $51 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14976,36 +14896,34 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 i32.const 48 call $std/array/assertSorted local.get $55 call $~lib/rt/pure/__release - local.get $51 + local.get $50 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release - local.get $53 + local.get $52 call $~lib/rt/pure/__release - local.get $57 + local.get $59 call $~lib/rt/pure/__release - local.get $60 + local.get $61 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release - local.get $58 + local.get $60 call $~lib/rt/pure/__release - local.get $50 + local.get $57 call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $52 + local.get $47 call $~lib/rt/pure/__release - local.get $46 + local.get $51 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -15013,7 +14931,9 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $61 + local.get $42 + call $~lib/rt/pure/__release + local.get $58 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15066,52 +14986,52 @@ i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $57 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $57 + local.set $59 local.get $56 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $61 - local.set $60 - local.get $61 + local.tee $58 + local.set $61 + local.get $58 i32.load offset=12 local.set $1 loop $for-loop|025 - local.get $57 + local.get $59 local.get $1 i32.lt_s if - local.get $60 - local.get $57 + local.get $61 + local.get $59 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $59 - local.get $60 - local.get $57 + local.tee $60 + local.get $61 + local.get $59 call $~lib/array/Array#__get local.tee $0 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> end - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $59 i32.const 1 i32.add - local.set $57 + local.set $59 br $for-loop|025 end end @@ -15126,57 +15046,57 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $58 call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $0 + local.set $59 i32.const 0 local.get $56 i32.load offset=12 local.tee $1 - local.get $58 + local.get $57 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 local.get $56 - local.get $58 + local.get $57 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|03 - local.get $0 + local.get $59 local.get $1 i32.lt_s if local.get $56 - local.get $0 + local.get $59 call $~lib/array/Array#__get local.tee $60 - local.get $58 - local.get $0 + local.get $57 + local.get $59 call $~lib/array/Array#__get - local.tee $59 + local.tee $0 call $~lib/string/String.__eq i32.eqz if local.get $60 call $~lib/rt/pure/__release - local.get $59 + local.get $0 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $59 i32.const 1 i32.add - local.set $0 + local.set $59 br $for-loop|03 end end @@ -15191,15 +15111,87 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray + i32.const 0 + local.set $53 + i32.const 1600 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + i32.const 0 + i32.const 1600 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $61 + i32.const 0 + i32.store + local.get $61 + i32.const 0 + i32.store offset=4 + local.get $61 + i32.const 0 + i32.store offset=8 + local.get $61 + i32.const 0 + i32.store offset=12 + local.get $0 local.tee $1 + local.get $61 + i32.load + local.tee $60 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $60 + call $~lib/rt/pure/__release + end + local.get $61 + local.get $1 + i32.store + local.get $61 + local.get $0 + i32.store offset=4 + local.get $61 + i32.const 1600 + i32.store offset=8 + local.get $61 + i32.const 400 + i32.store offset=12 + loop $for-loop|09 + local.get $53 + i32.const 400 + i32.lt_s + if + local.get $61 + local.get $53 + 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 $53 + i32.const 1 + i32.add + local.set $53 + br $for-loop|09 + end + end + local.get $61 i32.const 56 call $std/array/assertSorted<~lib/array/Array> local.get $56 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release - local.get $1 + local.get $61 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15207,12 +15199,12 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $52 i32.load offset=4 - local.get $53 + local.get $52 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $46 + local.tee $45 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15230,10 +15222,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $44 i32.const 6064 call $~lib/array/Array#join - local.tee $44 + local.tee $43 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15251,10 +15243,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $42 i32.const 6512 call $~lib/array/Array#join - local.tee $57 + local.tee $59 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15275,7 +15267,7 @@ local.tee $56 i32.const 6576 call $~lib/array/Array#join - local.tee $58 + local.tee $57 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15293,12 +15285,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $49 i32.load offset=4 - local.get $50 + local.get $49 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $61 + local.tee $58 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15316,10 +15308,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $61 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $59 + local.tee $60 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15337,7 +15329,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $48 i32.load offset=4 local.tee $1 i32.const 0 @@ -15350,7 +15342,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $49 + local.get $48 call $~lib/array/Array#join local.tee $0 i32.const 8096 @@ -15370,7 +15362,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $47 i32.load offset=4 local.tee $1 i32.const 0 @@ -15380,7 +15372,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $48 + local.get $47 call $~lib/array/Array#join local.tee $1 i32.const 8176 @@ -15394,9 +15386,7 @@ call $~lib/builtins/abort unreachable end - local.get $53 - call $~lib/rt/pure/__release - local.get $46 + local.get $52 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -15404,25 +15394,27 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $57 + local.get $42 + call $~lib/rt/pure/__release + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release - local.get $50 + local.get $49 + call $~lib/rt/pure/__release + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release - local.get $49 + local.get $48 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $48 + local.get $47 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -15432,29 +15424,29 @@ i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $39 + local.set $38 i32.const 1 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $38 + local.set $37 i32.const 2 i32.const 2 i32.const 3 i32.const 8304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $37 + local.set $36 i32.const 4 i32.const 2 i32.const 3 i32.const 8336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $36 - local.get $39 + local.set $35 + local.get $38 i32.const 6304 call $~lib/array/Array#join local.tee $1 @@ -15470,11 +15462,11 @@ call $~lib/builtins/abort unreachable end - local.get $38 + local.get $37 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $50 + local.set $49 local.get $1 i32.const 7984 call $~lib/string/String.__eq @@ -15487,11 +15479,11 @@ call $~lib/builtins/abort unreachable end - local.get $37 + local.get $36 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $49 + local.set $48 local.get $1 i32.const 8368 call $~lib/string/String.__eq @@ -15504,11 +15496,11 @@ call $~lib/builtins/abort unreachable end - local.get $36 + local.get $35 i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $48 + local.set $47 local.get $1 i32.const 8400 call $~lib/string/String.__eq @@ -15533,7 +15525,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $46 + local.set $45 local.get $1 i32.const 8464 call $~lib/string/String.__eq @@ -15558,7 +15550,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $45 + local.set $44 local.get $1 i32.const 8528 call $~lib/string/String.__eq @@ -15577,13 +15569,13 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $51 i32.load offset=4 - local.get $52 + local.get $51 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $44 + local.set $43 local.get $1 i32.const 8624 call $~lib/string/String.__eq @@ -15602,13 +15594,13 @@ i32.const 8688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $50 i32.load offset=4 - local.get $51 + local.get $50 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $43 + local.set $42 local.get $1 i32.const 8736 call $~lib/string/String.__eq @@ -15627,7 +15619,7 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $59 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 @@ -15650,11 +15642,11 @@ i32.const 9008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $57 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $61 + local.set $58 local.get $1 i32.const 9040 call $~lib/string/String.__eq @@ -15673,7 +15665,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $33 i32.load offset=4 local.tee $1 i32.const 2 @@ -15691,13 +15683,13 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $34 + local.get $33 i32.load offset=4 - local.get $34 + local.get $33 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $1 - local.set $60 + local.set $61 local.get $1 i32.const 9136 call $~lib/string/String.__eq @@ -15716,7 +15708,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $32 i32.load offset=4 local.tee $1 i32.const 2 @@ -15734,13 +15726,13 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $33 + local.get $32 i32.load offset=4 - local.get $33 + local.get $32 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $1 - local.set $59 + local.set $60 local.get $1 i32.const 9136 call $~lib/string/String.__eq @@ -15759,7 +15751,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $39 i32.load offset=4 i32.const 1 i32.const 2 @@ -15778,9 +15770,9 @@ i32.store local.get $1 i32.store - local.get $40 + local.get $39 i32.load offset=4 - local.get $40 + local.get $39 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $0 @@ -15797,30 +15789,26 @@ call $~lib/builtins/abort unreachable end - local.get $39 - call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release local.get $37 call $~lib/rt/pure/__release local.get $36 call $~lib/rt/pure/__release + local.get $35 call $~lib/rt/pure/__release - local.get $50 call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $55 - call $~lib/rt/pure/__release - local.get $46 + local.get $47 call $~lib/rt/pure/__release - local.get $54 + local.get $55 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release - local.get $52 + local.get $54 call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release @@ -15828,18 +15816,22 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $57 + local.get $50 + call $~lib/rt/pure/__release + local.get $42 + call $~lib/rt/pure/__release + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr @@ -15850,7 +15842,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $58 i32.load offset=4 local.tee $1 i32.const 1 @@ -15884,9 +15876,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $61 + local.get $58 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $60 + local.tee $61 i32.load offset=12 i32.const 10 i32.ne @@ -15899,14 +15891,14 @@ unreachable end loop $for-loop|1 - local.get $41 + local.get $40 i32.const 10 i32.lt_s if - local.get $60 - local.get $41 + local.get $61 + local.get $40 call $~lib/array/Array#__get - local.get $41 + local.get $40 i32.ne if i32.const 0 @@ -15916,10 +15908,10 @@ call $~lib/builtins/abort unreachable end - local.get $41 + local.get $40 i32.const 1 i32.add - local.set $41 + local.set $40 br $for-loop|1 end end @@ -15929,7 +15921,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.load offset=4 local.tee $1 i32.const 1 @@ -15963,7 +15955,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $59 + local.get $60 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat local.set $56 i32.const 8 @@ -15972,7 +15964,7 @@ i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $57 local.get $56 i32.load offset=12 i32.const 8 @@ -15986,19 +15978,19 @@ unreachable end i32.const 0 - local.set $41 + local.set $40 loop $for-loop|2 - local.get $41 - local.get $58 + local.get $40 + local.get $57 i32.load offset=12 i32.lt_s if local.get $56 - local.get $41 + local.get $40 call $~lib/array/Array#__get local.tee $0 - local.get $58 - local.get $41 + local.get $57 + local.get $40 call $~lib/array/Array#__get local.tee $1 call $~lib/string/String.__eq @@ -16015,10 +16007,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $41 + local.get $40 i32.const 1 i32.add - local.set $41 + local.set $40 br $for-loop|2 end end @@ -16062,29 +16054,29 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $35 + local.get $34 + call $~lib/rt/pure/__release + local.get $30 call $~lib/rt/pure/__release local.get $31 call $~lib/rt/pure/__release - local.get $32 + local.get $26 call $~lib/rt/pure/__release - local.get $27 + local.get $33 call $~lib/rt/pure/__release - local.get $34 + local.get $32 call $~lib/rt/pure/__release - local.get $33 + local.get $39 call $~lib/rt/pure/__release - local.get $40 + local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $59 - call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $58 + local.get $57 call $~lib/rt/pure/__release ) (func $~start From 045b1a3e335c9653e695e9def264933f6dd252c5 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 10:12:48 +0300 Subject: [PATCH 11/34] move extra inline pass upper (before pick-load-signs) --- cli/asc.js | 2 +- tests/compiler/constructor.optimized.wat | 9 +- tests/compiler/do.optimized.wat | 15 +- tests/compiler/for.optimized.wat | 15 +- .../implicit-getter-setter.optimized.wat | 15 +- tests/compiler/issues/1095.optimized.wat | 15 +- tests/compiler/managed-cast.optimized.wat | 15 +- tests/compiler/rc/local-init.optimized.wat | 15 +- .../rc/logical-and-mismatch.optimized.wat | 15 +- .../rc/logical-or-mismatch.optimized.wat | 15 +- tests/compiler/rc/optimize.optimized.wat | 15 +- tests/compiler/rc/rereturn.optimized.wat | 15 +- .../rc/ternary-mismatch.optimized.wat | 15 +- tests/compiler/retain-return.optimized.wat | 15 +- tests/compiler/runtime-full.optimized.wat | 15 +- tests/compiler/std/array.optimized.wat | 589 +- tests/compiler/std/arraybuffer.optimized.wat | 21 +- tests/compiler/std/dataview.optimized.wat | 15 +- .../std/string-encoding.optimized.wat | 15 +- tests/compiler/std/typedarray.optimized.wat | 8127 +++++++++-------- tests/compiler/while.optimized.wat | 15 +- 21 files changed, 4486 insertions(+), 4502 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index cb80555fbe..242b60ccf3 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -721,11 +721,11 @@ exports.main = function main(argv, options, callback) { add("remove-unused-brs"); add("remove-unused-names"); // add("optimize-instructions"); // differs move 2 lines above + add("inlining"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs } - add("inlining"); // differs add("optimize-instructions"); // differs if (optimizeLevel >= 3 || shrinkLevel >= 2) { add("precompute-propagate"); diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index c3024b02dc..a7cb4810c7 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -90,7 +90,6 @@ local.get $4 ) (func $~start - (local $0 i32) i32.const 1024 global.set $~lib/rt/stub/offset i32.const 0 @@ -128,14 +127,12 @@ i32.const 0 i32.const 12 call $~lib/rt/stub/__alloc - local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 0 i32.const 12 call $~lib/rt/stub/__alloc + drop end - drop ) ) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index d7d4c2c3ed..2bbf25efbc 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1429,22 +1429,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1216 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index e9574e0fe1..2916c1ca05 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1438,22 +1438,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1216 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 7330373bbe..195c72da06 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1211,22 +1211,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1228 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1228 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 80b9663484..0a0014dd1f 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1028,22 +1028,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1260 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1260 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index d91471cd71..af109adb56 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1146,22 +1146,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1276 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1276 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 2eef615020..edb0ae12a4 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -986,22 +986,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1200 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1200 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 4bffe8769f..8c39977a68 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1028,22 +1028,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1184 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 400e0a5d28..16a581c0be 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1030,22 +1030,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1184 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 6d86849e1e..d8bf9cda4c 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1081,22 +1081,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1204 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1204 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 806a93a5ce..7cc2ef5da1 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1127,22 +1127,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1220 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1220 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 2c58670d20..93c050c652 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1029,22 +1029,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1184 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index c2074a0e2b..2390cc6e50 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1026,22 +1026,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1184 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index c9c9196708..484acf1fbe 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1127,22 +1127,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1212 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1212 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index e6c47b3c95..4542ee7a21 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -9577,13 +9577,13 @@ (local $38 i32) (local $39 i32) (local $40 i32) - (local $41 f64) - (local $42 i32) + (local $41 i32) + (local $42 f64) (local $43 i32) (local $44 i32) (local $45 i32) - (local $46 f32) - (local $47 i32) + (local $46 i32) + (local $47 f32) (local $48 i32) (local $49 i32) (local $50 i32) @@ -9607,7 +9607,7 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $60 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -9615,44 +9615,44 @@ i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $59 + local.get $60 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $60 end - local.get $59 + local.get $60 i32.const 0 i32.store - local.get $59 + local.get $60 i32.const 0 i32.store offset=4 - local.get $59 + local.get $60 i32.const 0 i32.store offset=8 local.get $1 local.tee $0 - local.get $59 + local.get $60 i32.load - local.tee $60 + local.tee $59 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $60 + local.get $59 call $~lib/rt/pure/__release end - local.get $59 + local.get $60 local.get $0 i32.store - local.get $59 + local.get $60 local.get $1 i32.store offset=4 - local.get $59 + local.get $60 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9666,7 +9666,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9735,7 +9735,7 @@ i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 call $std/array/isArraysEqual i32.eqz if @@ -9800,7 +9800,7 @@ call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -9875,7 +9875,7 @@ i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9943,7 +9943,7 @@ call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -10208,7 +10208,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $0 i32.load offset=4 local.tee $1 i32.const 0 @@ -10218,41 +10218,41 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $60 + local.get $0 i32.load offset=12 local.tee $1 i32.const 0 i32.gt_s if - local.get $60 + local.get $0 i32.load offset=4 - local.tee $0 + local.tee $60 local.get $1 i32.const 2 i32.shl i32.add local.set $1 loop $do-continue|0 - local.get $0 + local.get $60 i32.load call $~lib/rt/pure/__release - local.get $0 + local.get $60 i32.const 4 i32.add - local.tee $0 + local.tee $60 local.get $1 i32.lt_u br_if $do-continue|0 end else - local.get $60 + local.get $0 i32.const 0 call $~lib/array/ensureSize end - local.get $60 + local.get $0 i32.const 0 i32.store offset=12 - local.get $60 + local.get $0 i32.load offset=12 if i32.const 0 @@ -10262,7 +10262,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $0 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor @@ -10502,7 +10502,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 i32.load offset=12 if i32.const 0 @@ -10512,7 +10512,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $59 global.get $std/array/arr call $~lib/array/Array#concat local.set $0 @@ -10530,7 +10530,7 @@ call $~lib/builtins/abort unreachable end - local.get $60 + local.get $59 i32.load offset=12 if i32.const 0 @@ -10546,7 +10546,7 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10657,14 +10657,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $51 + local.tee $52 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10689,14 +10689,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $52 + local.tee $53 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10721,14 +10721,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $48 + local.tee $49 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10753,14 +10753,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $45 + local.tee $46 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10785,14 +10785,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $43 + local.tee $44 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10817,7 +10817,7 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $59 + local.tee $60 i32.const 5 i32.const 2 i32.const 3 @@ -10889,7 +10889,7 @@ i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10907,10 +10907,10 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $39 + local.set $40 local.get $0 call $~lib/rt/pure/__release - local.get $39 + local.get $40 i32.const -4 i32.const -3 i32.const 2147483647 @@ -10934,7 +10934,7 @@ call $~lib/builtins/abort unreachable end - local.get $39 + local.get $40 call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release @@ -10948,17 +10948,19 @@ call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release - local.get $50 + local.get $53 call $~lib/rt/pure/__release - local.get $52 + local.get $50 call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $47 + local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -10966,9 +10968,7 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release @@ -10978,7 +10978,7 @@ call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -11359,14 +11359,14 @@ unreachable end global.get $std/array/arr - local.tee $60 + local.tee $59 i32.load offset=12 local.tee $1 if - local.get $60 + local.get $59 i32.load offset=4 local.set $0 - local.get $60 + local.get $59 i32.load offset=4 local.get $1 i32.const 1 @@ -11374,30 +11374,30 @@ i32.const 2 i32.shl i32.add - local.set $59 + local.set $60 loop $while-continue|0 local.get $0 - local.get $59 + local.get $60 i32.lt_u if local.get $0 i32.load local.set $1 local.get $0 - local.get $59 + local.get $60 i32.load i32.store - local.get $59 + local.get $60 local.get $1 i32.store local.get $0 i32.const 4 i32.add local.set $0 - local.get $59 + local.get $60 i32.const 4 i32.sub - local.set $59 + local.set $60 br $while-continue|0 end end @@ -11934,14 +11934,14 @@ i32.shl i32.add f32.load - local.tee $46 + local.tee $47 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $46 - local.get $46 + local.get $47 + local.get $47 f32.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -11966,7 +11966,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $59 + local.set $60 i32.const 0 i32.const 1 i32.const 3 @@ -11976,10 +11976,10 @@ call $~lib/rt/pure/__retain local.tee $61 i32.load offset=12 - local.tee $60 + local.tee $59 if (result i32) i32.const 0 - local.get $60 + local.get $59 i32.ge_s else i32.const 1 @@ -11990,33 +11990,33 @@ i32.load offset=4 local.set $1 loop $while-continue|025 - local.get $59 local.get $60 + local.get $59 i32.lt_s if i32.const 1 local.get $1 - local.get $59 + local.get $60 i32.const 3 i32.shl i32.add f64.load - local.tee $41 + local.tee $42 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $41 - local.get $41 + local.get $42 + local.get $42 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $59 + local.get $60 i32.const 1 i32.add - local.set $59 + local.set $60 br $while-continue|025 end end @@ -12503,7 +12503,7 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $39 + local.tee $40 i32.const 1 i32.const 2 i32.const 3 @@ -12610,7 +12610,7 @@ i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12629,7 +12629,7 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12654,14 +12654,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $52 + local.tee $53 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12680,7 +12680,7 @@ i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12705,14 +12705,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $47 + local.tee $48 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12731,7 +12731,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12756,14 +12756,14 @@ i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $43 + local.tee $44 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12782,7 +12782,7 @@ i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12831,23 +12831,23 @@ call $~lib/rt/pure/__retain local.tee $34 i32.load offset=4 - local.tee $60 + local.tee $59 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $60 + local.get $59 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $60 + local.get $59 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $60 + local.get $59 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $60 + local.get $59 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 @@ -12946,7 +12946,7 @@ local.get $34 i32.const 2 call $~lib/array/Array#__get - local.tee $60 + local.tee $59 i32.load i32.const 5 i32.ne @@ -13115,7 +13115,7 @@ call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $39 + local.get $40 call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release @@ -13129,17 +13129,19 @@ call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release - local.get $50 + local.get $53 call $~lib/rt/pure/__release - local.get $52 + local.get $50 call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $47 + local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -13147,9 +13149,7 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release @@ -13159,7 +13159,7 @@ call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release @@ -13639,17 +13639,17 @@ unreachable end loop $for-loop|0 - local.get $53 + local.get $39 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $53 + local.get $39 i32.const 1 i32.add - local.set $53 + local.set $39 br $for-loop|0 end end @@ -13666,11 +13666,11 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $59 + local.set $60 global.get $std/array/arr local.tee $61 i32.load offset=12 - local.tee $60 + local.tee $59 i32.const 2 i32.const 9 i32.const 0 @@ -13680,18 +13680,18 @@ i32.load offset=4 local.set $0 loop $for-loop|043 - local.get $59 local.get $60 + local.get $59 local.get $61 i32.load offset=12 local.tee $1 - local.get $60 + local.get $59 local.get $1 i32.lt_s select i32.lt_s if - local.get $59 + local.get $60 i32.const 2 i32.shl local.tee $1 @@ -13700,16 +13700,16 @@ i32.add i32.load f32.convert_i32_s - local.set $46 + local.set $47 local.get $0 local.get $1 i32.add - local.get $46 + local.get $47 f32.store - local.get $59 + local.get $60 i32.const 1 i32.add - local.set $59 + local.set $60 br $for-loop|043 end end @@ -14262,7 +14262,7 @@ call $~lib/rt/pure/__retain local.tee $55 i32.load offset=12 - local.tee $60 + local.tee $59 i32.const 1 i32.le_s if @@ -14273,7 +14273,7 @@ local.get $55 i32.load offset=4 local.set $61 - local.get $60 + local.get $59 i32.const 2 i32.eq if @@ -14282,13 +14282,13 @@ local.tee $29 local.get $61 f32.load - local.tee $46 + local.tee $47 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if local.get $61 - local.get $46 + local.get $47 f32.store offset=4 local.get $61 local.get $29 @@ -14298,7 +14298,7 @@ call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $60 + local.get $59 i32.const 256 i32.lt_s if @@ -14306,7 +14306,7 @@ local.set $58 loop $for-loop|00 local.get $58 - local.get $60 + local.get $59 i32.lt_s if local.get $61 @@ -14332,7 +14332,7 @@ i32.shl i32.add f32.load - local.tee $46 + local.tee $47 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -14349,7 +14349,7 @@ i32.const 2 i32.shl i32.add - local.get $46 + local.get $47 f32.store br $while-continue|1 end @@ -14373,7 +14373,7 @@ end else local.get $61 - local.get $60 + local.get $59 call $~lib/util/sort/weakHeapSort end local.get $55 @@ -14387,41 +14387,41 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $50 + local.set $51 i32.const 0 - local.set $59 + local.set $60 i32.const 0 local.get $55 i32.load offset=12 local.tee $1 - local.get $50 + local.get $51 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $50 + local.get $51 local.get $55 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|001 - local.get $59 + local.get $60 local.get $1 i32.lt_s if local.get $55 - local.get $59 + local.get $60 call $~lib/array/Array#__get - local.tee $46 - local.get $46 + local.tee $47 + local.get $47 f32.ne if (result i32) - local.get $50 - local.get $59 + local.get $51 + local.get $60 call $~lib/array/Array#__get - local.tee $46 - local.get $46 + local.tee $47 + local.get $47 f32.ne else i32.const 0 @@ -14430,19 +14430,19 @@ if i32.const 0 local.get $55 - local.get $59 + local.get $60 call $~lib/array/Array#__get - local.get $50 - local.get $59 + local.get $51 + local.get $60 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $59 + local.get $60 i32.const 1 i32.add - local.set $59 + local.set $60 br $for-loop|001 end end @@ -14466,7 +14466,7 @@ call $~lib/rt/pure/__retain local.tee $54 i32.load offset=12 - local.tee $60 + local.tee $59 i32.const 1 i32.le_s if @@ -14477,7 +14477,7 @@ local.get $54 i32.load offset=4 local.set $61 - local.get $60 + local.get $59 i32.const 2 i32.eq if @@ -14486,13 +14486,13 @@ local.tee $28 local.get $61 f64.load - local.tee $41 + local.tee $42 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if local.get $61 - local.get $41 + local.get $42 f64.store offset=8 local.get $61 local.get $28 @@ -14502,7 +14502,7 @@ call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $60 + local.get $59 i32.const 256 i32.lt_s if @@ -14510,7 +14510,7 @@ local.set $58 loop $for-loop|02 local.get $58 - local.get $60 + local.get $59 i32.lt_s if local.get $61 @@ -14536,7 +14536,7 @@ i32.shl i32.add f64.load - local.tee $41 + local.tee $42 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -14553,7 +14553,7 @@ i32.const 3 i32.shl i32.add - local.get $41 + local.get $42 f64.store br $while-continue|13 end @@ -14577,7 +14577,7 @@ end else local.get $61 - local.get $60 + local.get $59 call $~lib/util/sort/weakHeapSort end local.get $54 @@ -14591,41 +14591,41 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 - i32.const 0 local.set $53 i32.const 0 + local.set $60 + i32.const 0 local.get $54 i32.load offset=12 local.tee $1 - local.get $52 + local.get $53 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $52 + local.get $53 local.get $54 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 - local.get $53 + local.get $60 local.get $1 i32.lt_s if local.get $54 - local.get $53 + local.get $60 call $~lib/array/Array#__get - local.tee $41 - local.get $41 + local.tee $42 + local.get $42 f64.ne if (result i32) - local.get $52 local.get $53 + local.get $60 call $~lib/array/Array#__get - local.tee $41 - local.get $41 + local.tee $42 + local.get $42 f64.ne else i32.const 0 @@ -14634,19 +14634,19 @@ if i32.const 0 local.get $54 - local.get $53 + local.get $60 call $~lib/array/Array#__get - local.get $52 local.get $53 + local.get $60 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $53 + local.get $60 i32.const 1 i32.add - local.set $53 + local.set $60 br $for-loop|01 end end @@ -14667,11 +14667,11 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $59 + local.get $60 i32.const 5 i32.const 2 i32.const 3 @@ -14707,7 +14707,7 @@ i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14732,50 +14732,50 @@ i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $49 + local.set $50 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $48 + local.set $49 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $47 + local.set $48 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $51 + local.set $52 i32.const 64 call $std/array/createReverseOrderedArray - local.set $45 + local.set $46 i32.const 128 call $std/array/createReverseOrderedArray - local.set $44 + local.set $45 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $43 + local.set $44 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $42 + local.set $43 i32.const 512 call $std/array/createRandomOrderedArray local.set $58 local.get $57 i32.const 48 call $std/array/assertSorted - local.get $49 + local.get $50 i32.const 48 call $std/array/assertSorted - local.get $49 + local.get $50 i32.const 1 i32.const 2 i32.const 3 @@ -14794,10 +14794,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 i32.const 2 i32.const 2 i32.const 3 @@ -14816,11 +14816,11 @@ call $~lib/builtins/abort unreachable end - local.get $47 + local.get $48 i32.const 48 call $std/array/assertSorted - local.get $47 - local.get $51 + local.get $48 + local.get $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14832,11 +14832,11 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $46 i32.const 48 call $std/array/assertSorted - local.get $45 - local.get $51 + local.get $46 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14848,11 +14848,11 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $45 i32.const 48 call $std/array/assertSorted - local.get $44 - local.get $51 + local.get $45 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14864,11 +14864,11 @@ call $~lib/builtins/abort unreachable end - local.get $43 + local.get $44 i32.const 48 call $std/array/assertSorted - local.get $43 - local.get $51 + local.get $44 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14880,11 +14880,11 @@ call $~lib/builtins/abort unreachable end - local.get $42 + local.get $43 i32.const 48 call $std/array/assertSorted - local.get $42 - local.get $51 + local.get $43 + local.get $52 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14901,29 +14901,31 @@ call $std/array/assertSorted local.get $55 call $~lib/rt/pure/__release - local.get $50 + local.get $51 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release - local.get $52 + local.get $53 call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $57 call $~lib/rt/pure/__release + local.get $50 + call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $47 + local.get $52 call $~lib/rt/pure/__release - local.get $51 + local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -14931,8 +14933,6 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $0 @@ -14989,7 +14989,7 @@ local.set $57 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $59 + local.set $60 local.get $56 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort @@ -14999,39 +14999,39 @@ i32.load offset=12 local.set $1 loop $for-loop|025 - local.get $59 + local.get $60 local.get $1 i32.lt_s if local.get $61 - local.get $59 + local.get $60 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $60 + local.tee $59 local.get $61 - local.get $59 + local.get $60 call $~lib/array/Array#__get local.tee $0 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> end - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $60 i32.const 1 i32.add - local.set $59 + local.set $60 br $for-loop|025 end end @@ -15050,7 +15050,7 @@ call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $59 + local.set $60 i32.const 0 local.get $56 i32.load offset=12 @@ -15067,36 +15067,36 @@ br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|03 - local.get $59 + local.get $60 local.get $1 i32.lt_s if local.get $56 - local.get $59 + local.get $60 call $~lib/array/Array#__get - local.tee $60 + local.tee $59 local.get $57 - local.get $59 + local.get $60 call $~lib/array/Array#__get local.tee $0 call $~lib/string/String.__eq i32.eqz if - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $60 i32.const 1 i32.add - local.set $59 + local.set $60 br $for-loop|03 end end @@ -15112,7 +15112,7 @@ unreachable end i32.const 0 - local.set $53 + local.set $39 i32.const 1600 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -15137,16 +15137,17 @@ i32.const 0 i32.store offset=12 local.get $0 - local.tee $1 + local.set $1 + local.get $0 local.get $61 i32.load - local.tee $60 + local.tee $59 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $60 + local.get $59 call $~lib/rt/pure/__release end local.get $61 @@ -15162,12 +15163,12 @@ i32.const 400 i32.store offset=12 loop $for-loop|09 - local.get $53 + local.get $39 i32.const 400 i32.lt_s if local.get $61 - local.get $53 + local.get $39 call $~lib/math/NativeMath.random f64.const 32 f64.mul @@ -15177,10 +15178,10 @@ call $~lib/array/Array<~lib/array/Array>#__set local.get $1 call $~lib/rt/pure/__release - local.get $53 + local.get $39 i32.const 1 i32.add - local.set $53 + local.set $39 br $for-loop|09 end end @@ -15199,12 +15200,12 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $53 i32.load offset=4 - local.get $52 + local.get $53 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $45 + local.tee $46 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15222,10 +15223,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $45 i32.const 6064 call $~lib/array/Array#join - local.tee $43 + local.tee $44 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15243,10 +15244,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $43 i32.const 6512 call $~lib/array/Array#join - local.tee $59 + local.tee $60 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15285,9 +15286,9 @@ i32.const 6672 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/joinFloatArray local.tee $58 @@ -15311,7 +15312,7 @@ local.tee $61 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $60 + local.tee $59 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15329,7 +15330,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $49 i32.load offset=4 local.tee $1 i32.const 0 @@ -15342,7 +15343,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $48 + local.get $49 call $~lib/array/Array#join local.tee $0 i32.const 8096 @@ -15362,7 +15363,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $48 i32.load offset=4 local.tee $1 i32.const 0 @@ -15372,7 +15373,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $47 + local.get $48 call $~lib/array/Array#join local.tee $1 i32.const 8176 @@ -15386,7 +15387,9 @@ call $~lib/builtins/abort unreachable end - local.get $52 + local.get $53 + call $~lib/rt/pure/__release + local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release @@ -15394,27 +15397,25 @@ call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release local.get $57 call $~lib/rt/pure/__release - local.get $49 + local.get $50 call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release - local.get $48 + local.get $49 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -15466,7 +15467,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $49 + local.set $50 local.get $1 i32.const 7984 call $~lib/string/String.__eq @@ -15483,7 +15484,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $48 + local.set $49 local.get $1 i32.const 8368 call $~lib/string/String.__eq @@ -15500,7 +15501,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $1 - local.set $47 + local.set $48 local.get $1 i32.const 8400 call $~lib/string/String.__eq @@ -15525,7 +15526,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $45 + local.set $46 local.get $1 i32.const 8464 call $~lib/string/String.__eq @@ -15550,7 +15551,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $44 + local.set $45 local.get $1 i32.const 8528 call $~lib/string/String.__eq @@ -15569,13 +15570,13 @@ i32.const 8576 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 $43 + local.set $44 local.get $1 i32.const 8624 call $~lib/string/String.__eq @@ -15594,13 +15595,13 @@ i32.const 8688 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 - local.set $42 + local.set $43 local.get $1 i32.const 8736 call $~lib/string/String.__eq @@ -15619,7 +15620,7 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $60 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 @@ -15732,7 +15733,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $1 - local.set $60 + local.set $59 local.get $1 i32.const 9136 call $~lib/string/String.__eq @@ -15751,7 +15752,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $40 i32.load offset=4 i32.const 1 i32.const 2 @@ -15770,9 +15771,9 @@ i32.store local.get $1 i32.store - local.get $39 + local.get $40 i32.load offset=4 - local.get $39 + local.get $40 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $0 @@ -15798,29 +15799,29 @@ local.get $35 call $~lib/rt/pure/__release call $~lib/rt/pure/__release + local.get $50 + call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release local.get $48 call $~lib/rt/pure/__release - local.get $47 - call $~lib/rt/pure/__release local.get $55 call $~lib/rt/pure/__release - local.get $45 + local.get $46 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release + local.get $45 + call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release local.get $43 call $~lib/rt/pure/__release - local.get $50 - call $~lib/rt/pure/__release - local.get $42 - call $~lib/rt/pure/__release - local.get $59 + local.get $60 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release @@ -15830,7 +15831,7 @@ call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -15891,14 +15892,14 @@ unreachable end loop $for-loop|1 - local.get $40 + local.get $41 i32.const 10 i32.lt_s if local.get $61 - local.get $40 + local.get $41 call $~lib/array/Array#__get - local.get $40 + local.get $41 i32.ne if i32.const 0 @@ -15908,10 +15909,10 @@ call $~lib/builtins/abort unreachable end - local.get $40 + local.get $41 i32.const 1 i32.add - local.set $40 + local.set $41 br $for-loop|1 end end @@ -15921,7 +15922,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $59 i32.load offset=4 local.tee $1 i32.const 1 @@ -15955,7 +15956,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $60 + local.get $59 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat local.set $56 i32.const 8 @@ -15978,19 +15979,19 @@ unreachable end i32.const 0 - local.set $40 + local.set $41 loop $for-loop|2 - local.get $40 + local.get $41 local.get $57 i32.load offset=12 i32.lt_s if local.get $56 - local.get $40 + local.get $41 call $~lib/array/Array#__get local.tee $0 local.get $57 - local.get $40 + local.get $41 call $~lib/array/Array#__get local.tee $1 call $~lib/string/String.__eq @@ -16007,10 +16008,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $40 + local.get $41 i32.const 1 i32.add - local.set $40 + local.set $41 br $for-loop|2 end end @@ -16066,13 +16067,13 @@ call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $39 + local.get $40 call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release local.get $61 call $~lib/rt/pure/__release - local.get $60 + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8ddd031f06..ec9173e528 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1612,7 +1612,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 @@ -1626,7 +1626,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $9 i32.eq if @@ -1641,9 +1641,10 @@ i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -1827,19 +1828,17 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $4 + local.set $3 local.get $6 i32.load local.tee $1 i32.const 16 i32.sub i32.load offset=12 - local.tee $0 - local.set $3 - local.get $0 + local.tee $5 i32.const 1073741808 i32.gt_u - local.get $0 + local.get $5 local.get $1 i32.const 16 i32.sub @@ -1888,7 +1887,7 @@ local.get $1 i32.store offset=4 local.get $8 - local.get $3 + local.get $5 i32.store offset=8 local.get $9 call $~lib/rt/pure/__release @@ -1897,7 +1896,7 @@ local.get $6 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index bde92ba99b..9da15f0a0b 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -3459,22 +3459,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1520 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1520 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 84e7eb0428..25b395397f 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -3178,22 +3178,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 22060 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 22060 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 1f374b5cda..313f17898a 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -27639,8 +27639,8 @@ br $for-loop|0 end end - block $folding-inner18 - block $folding-inner1 + block $folding-inner19 + block $folding-inner18 block $folding-inner0 block $folding-inner17 block $folding-inner16 @@ -27655,2899 +27655,279 @@ block $folding-inner5 block $folding-inner4 block $folding-inner3 - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner3 - 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-inner2 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-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 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-inner2 + 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-inner3 - 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 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-inner2 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 $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-inner4 - 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-inner4 - 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-inner4 - 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 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-inner2 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_s - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|05 + 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-inner4 - 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 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner2 + 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 $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 - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner4 - 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-inner4 - 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-inner4 - 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-inner4 - 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-inner4 - 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 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 $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-inner4 - 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 + local.set $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.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-inner4 - 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 $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 - 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_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 + 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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.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 $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 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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.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-inner2 + 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 $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 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 + 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 $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 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 + i32.const 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner2 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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 + 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 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner7 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner7 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner7 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner7 - 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-inner5 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner6 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner7 - 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-inner8 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner9 - 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-inner8 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner9 - 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-inner10 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner10 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner11 - 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-inner12 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner13 - 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-inner12 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner13 - 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 2704 - 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 2704 - 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 2704 - 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 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set 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 - block $folding-inner2 - global.get $std/typedarray/forEachCallCount + 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-inner2 - 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/Uint8Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $1 - i32.const 113 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne + i32.const 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $1 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $1 - i32.const 114 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne + i32.const 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 i32.const 0 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + f32.const 3 + call $~lib/typedarray/Float32Array#__set i32.const 0 local.set $1 local.get $0 @@ -30555,1484 +27935,4107 @@ local.set $29 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $28 - loop $for-loop|021 + loop $for-loop|02 local.get $1 local.get $28 i32.lt_s if - i32.const 3 + i32.const 4 global.set $~argumentsLength + local.get $21 local.get $29 local.get $1 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + f32.load + f32.add + local.set $21 local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|021 + br $for-loop|02 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne + local.get $21 + f32.const 6 + f32.ne br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 i32.const 0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + 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 1 + i32.const 3 i32.shr_u local.set $28 - loop $for-loop|022 + loop $for-loop|03 local.get $1 local.get $28 i32.lt_s if - i32.const 3 + i32.const 4 global.set $~argumentsLength + local.get $22 local.get $29 local.get $1 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_u - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + f64.load + f64.add + local.set $22 local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|022 + br $for-loop|03 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne + local.get $22 + f64.const 6 + f64.ne br_if $folding-inner2 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 2704 + call $~lib/typedarray/Int8Array#constructor + local.tee $29 i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 i32.const 1 - i32.const 2704 + call $~lib/typedarray/Int8Array#__set + local.get $29 i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 i32.const 2 - i32.const 2704 + call $~lib/typedarray/Int8Array#__set + local.get $29 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-inner2 - 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 2704 + call $~lib/typedarray/Int8Array#__set i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - 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.sub + local.set $1 + loop $for-loop|04 + 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-inner2 - local.get $1 + br_if $folding-inner3 + local.get $29 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 i32.const 0 - i32.const 2704 - 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 2704 i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 + i32.const 1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount + 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-inner2 + br_if $folding-inner3 local.get $1 call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 i32.const 0 - i32.const 2704 - 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 2704 i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 + i32.const 1 i32.const 2 - i32.const 2704 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount + 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-inner2 + br_if $folding-inner3 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 2704 + call $~lib/typedarray/Int16Array#constructor + local.tee $29 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 2704 + call $~lib/typedarray/Int16Array#__set + local.get $29 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 2704 + call $~lib/typedarray/Int16Array#__set + local.get $29 i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $29 i32.load offset=4 - local.set $29 - local.get $0 + local.set $28 + local.get $29 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $28 - loop $for-loop|023 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|05 local.get $1 - local.get $28 - i32.lt_s + i32.const 0 + i32.ge_s if - i32.const 3 + i32.const 4 global.set $~argumentsLength - local.get $29 + local.get $0 + local.get $28 local.get $1 - i32.const 2 + i32.const 1 i32.shl i32.add - f32.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + i32.load16_s + i32.add + local.set $0 local.get $1 i32.const 1 - i32.add + i32.sub local.set $1 - br $for-loop|023 + br $for-loop|05 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner2 local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 + local.get $29 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 2704 + call $~lib/typedarray/Uint16Array#constructor + local.tee $29 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 2704 + call $~lib/typedarray/Uint16Array#__set + local.get $29 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 2704 + call $~lib/typedarray/Uint16Array#__set + local.get $29 i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i32.const 3 + call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $29 i32.load offset=4 - local.set $29 - local.get $0 + local.set $28 + local.get $29 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - local.set $28 - loop $for-loop|024 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|06 local.get $1 - local.get $28 - i32.lt_s + i32.const 0 + i32.ge_s if - i32.const 3 + i32.const 4 global.set $~argumentsLength - local.get $29 + local.get $0 + local.get $28 local.get $1 - i32.const 3 + i32.const 1 i32.shl i32.add - f64.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + i32.load16_u + i32.add + local.set $0 local.get $1 i32.const 1 - i32.add + i32.sub local.set $1 - br $for-loop|024 + br $for-loop|06 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner2 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 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 local.get $29 - f64.const nan:0x8000000000000 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if + 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 + block $folding-inner1 + 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 1312 - i32.const 607 + 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/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 + 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 + 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 - local.tee $28 - if (result i32) + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|08 + local.get $0 i32.const 0 - local.get $28 i32.ge_s - else - i32.const 1 + 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 - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $29 + 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 $25 - loop $while-continue|0 + 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 - local.get $25 - local.get $1 i32.const 3 - i32.shl + global.set $~argumentsLength + local.get $1 + local.get $27 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 + 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 $while-continue|0 + br $for-loop|09 end end - end - local.get $0 - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if + 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 - i32.const 1312 - i32.const 608 + call $~lib/typedarray/Int8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 3 - 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 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 i32.const 0 - i32.const 1312 - i32.const 613 + 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/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 + call $~lib/typedarray/Uint8Array#__set + i32.const 0 + local.set $1 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.set $28 local.get $0 i32.load offset=4 - local.set $26 - loop $while-continue|025 + local.set $25 + 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 - local.get $27 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 - local.get $28 - i32.const 2 - i32.shl + i32.mul + i32.store8 + local.get $1 + i32.const 1 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.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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|011 + 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 $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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 + 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 $28 - br $while-continue|025 + local.set $1 + br $for-loop|012 end end - end - local.get $1 - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if + 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 - i32.const 1312 - i32.const 614 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 3 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 - local.get $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 $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - local.get $29 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $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 $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - local.get $29 - call $~lib/rt/pure/__release - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner1 - 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $29 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $29 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - 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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner6 + 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-inner7 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + 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 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-inner7 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + 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 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-inner7 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + 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 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-inner7 + local.get $1 + i32.const 53 + call $~lib/typedarray/Int16Array#some + 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 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-inner7 + local.get $1 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + 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 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-inner7 + local.get $1 + i32.const 57 + call $~lib/typedarray/Int32Array#some + 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 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-inner7 + local.get $1 + i32.const 59 + call $~lib/typedarray/Int32Array#some + 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 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-inner7 + local.get $1 + i32.const 61 + call $~lib/typedarray/Int64Array#some + 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 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-inner7 + local.get $1 + i32.const 63 + call $~lib/typedarray/Int64Array#some + 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 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-inner7 + local.get $1 + i32.const 65 + call $~lib/typedarray/Float32Array#some + 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 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-inner7 + local.get $1 + i32.const 67 + call $~lib/typedarray/Float64Array#some + 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 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-inner9 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner10 + 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-inner11 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner12 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner13 + 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 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 1312 + i32.const 607 + i32.const 3 + 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 1312 + i32.const 608 + i32.const 3 + 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 1312 + i32.const 613 + i32.const 3 + 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 1312 + i32.const 614 + i32.const 3 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 + local.get $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 $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $29 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $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 $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $29 + call $~lib/rt/pure/__release + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $29 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $29 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + 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 1312 + i32.const 691 + i32.const 3 + 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 1312 + i32.const 695 + i32.const 3 + 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 $29 + i32.const 0 + 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 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $28 + i32.const 0 + 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 + i32.const 1 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner19 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + local.set $26 + 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 $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 + f32.load + local.tee $21 + local.get $21 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $21 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|026 + end + end + local.get $0 + local.get $28 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.const 0 + 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-inner19 + 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 8352 + 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 1312 - i32.const 691 + 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 - 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 -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $25 i32.const 0 - i32.const 1312 - i32.const 695 + 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 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $25 i32.const 3 - 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 $29 - i32.const 0 - 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 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $28 - i32.const 0 - 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 - i32.const 1 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner18 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $26 - 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 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $26 local.get $1 - local.get $23 - i32.lt_s - if - local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner19 + local.get $0 + i32.load offset=4 + local.set $23 + local.get $1 + i32.load offset=4 + 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 - i32.add - local.get $24 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $21 - local.get $21 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $21 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 + local.get $18 + i32.lt_s + if + local.get $23 + local.get $26 + i32.add + i32.const 255 + local.get $19 + local.get $26 + 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 $26 + i32.const 1 + i32.add + local.set $26 + br $for-loop|028 end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - 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 - 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-inner18 - 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 $0 + local.get $25 + 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 8384 + 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 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release 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 8352 - 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 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 $25 - i32.const 0 - 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 - 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.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner18 - local.get $0 - i32.load offset=4 - local.set $23 - local.get $1 - i32.load offset=4 - local.set $19 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $18 - loop $for-loop|028 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release local.get $26 - local.get $18 - i32.lt_s - if - local.get $23 - local.get $26 - i32.add - i32.const 255 - local.get $19 - local.get $26 - 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 $26 - i32.const 1 - i32.add - local.set $26 - br $for-loop|028 - end + call $~lib/rt/pure/__release + return 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 - i32.const 21 - i32.const 8384 - 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 - 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 + br $folding-inner3 end i32.const 0 i32.const 1312 - i32.const 495 + i32.const 323 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 323 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 344 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 365 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 366 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 367 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 415 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 417 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 438 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 440 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 461 + i32.const 463 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 463 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 25ff04c5f2..106322a73b 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1457,22 +1457,21 @@ 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.add 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 + i32.load offset=16 local.tee $1 if - local.get $1 - i32.const 1216 - i32.ge_u - if + block $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.lt_u + br_if $__inlined_func$~lib/rt/pure/__visit local.get $1 i32.const 16 i32.sub From e0cd790edceae7d019e081e12a208e61d8c48045 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 10:46:36 +0300 Subject: [PATCH 12/34] move optimize-istruction earlier --- cli/asc.js | 2 +- 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 -- .../object-literal-unmanaged.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 +- 33 files changed, 69 insertions(+), 73 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 242b60ccf3..a55f6ff53b 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -722,11 +722,11 @@ exports.main = function main(argv, options, callback) { add("remove-unused-names"); // add("optimize-instructions"); // differs move 2 lines above add("inlining"); // differs + add("optimize-instructions"); // differs 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 2bbf25efbc..b9ea3a90d5 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -711,10 +711,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 8d981b4289..e0b0674624 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.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 @@ -1378,10 +1378,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 2916c1ca05..a6308a4c17 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -708,10 +708,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 195c72da06..524d606be0 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -643,10 +643,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 0a0014dd1f..c698dce35f 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -627,10 +627,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 af109adb56..dbe0d0dc8e 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -629,10 +629,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 0278a893e6..70bb4512b5 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -518,10 +518,10 @@ br $while-continue|2 end end - local.get $2 local.get $12 i32.const 1 i32.shl + local.get $2 i32.add local.get $5 local.get $5 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index edb0ae12a4..12166f69cc 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -626,10 +626,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 8c39977a68..ac620a39e6 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -626,10 +626,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 16a581c0be..f98a906982 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -626,10 +626,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 d8bf9cda4c..04df90aa1e 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.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/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 7cc2ef5da1..89b0c2af83 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -629,10 +629,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 93c050c652..aeddbf1cd8 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -628,10 +628,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 85612ecfb8..2401cbf8a9 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -647,10 +647,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 3d349d6110..aaed61f712 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.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 @@ -1559,10 +1559,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 2390cc6e50..a93c9f867f 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -624,10 +624,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 484acf1fbe..1388e52913 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -629,10 +629,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 0db0594b51..ddd2247e86 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -681,10 +681,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 4542ee7a21..805f0d5710 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -859,10 +859,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 @@ -2194,10 +2194,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 ec9173e528..1beb99cfd4 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.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/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 9da15f0a0b..e06e0b8ac0 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -641,10 +641,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 dd7957dedf..e791c8f028 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1238,7 +1238,6 @@ local.set $7 local.get $5 i32.wrap_i64 - local.set $2 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -1277,7 +1276,6 @@ i32.const 2147483647 i32.and local.tee $7 - local.get $2 i32.or i32.eqz if diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 5565cf2e2d..123b8c861a 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.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 @@ -1894,10 +1894,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 e86086710a..a54c44c373 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -2618,7 +2618,6 @@ local.set $7 local.get $5 i32.wrap_i64 - local.set $2 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -2657,7 +2656,6 @@ i32.const 2147483647 i32.and local.tee $7 - local.get $2 i32.or i32.eqz if diff --git a/tests/compiler/std/object-literal-unmanaged.optimized.wat b/tests/compiler/std/object-literal-unmanaged.optimized.wat index f66c763a3d..95982af30e 100644 --- a/tests/compiler/std/object-literal-unmanaged.optimized.wat +++ b/tests/compiler/std/object-literal-unmanaged.optimized.wat @@ -624,10 +624,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/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 6eb76908ca..b073a33935 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -647,10 +647,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 @@ -1885,10 +1885,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 4d9da2466b..ec97281e2d 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -681,10 +681,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 5ed361c784..55f30ddd8f 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -970,10 +970,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 @@ -1775,10 +1775,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 @@ -1905,10 +1905,10 @@ local.get $6 i32.lt_u if - local.get $0 local.get $7 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u local.tee $2 @@ -1929,10 +1929,10 @@ i32.lt_u select if - local.get $0 local.get $7 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u offset=2 local.tee $9 @@ -1961,15 +1961,15 @@ i32.const 131072 i32.ge_u if - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add - local.get $1 local.get $9 i32.const 16 i32.shl + local.get $1 i32.or i32.store local.get $10 @@ -1986,10 +1986,10 @@ i32.const 25 i32.le_u if - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add local.get $2 i32.const 26 @@ -2068,10 +2068,10 @@ local.tee $1 i32.load16_u offset=6 local.set $2 - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add local.tee $9 local.get $1 @@ -2080,12 +2080,12 @@ local.get $9 local.get $2 i32.store16 offset=4 - local.get $10 local.get $2 i32.const 0 i32.ne i32.const 1 i32.add + local.get $10 i32.add local.set $10 else @@ -2098,18 +2098,18 @@ i32.const 65536 i32.lt_s if - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add local.get $2 i32.store16 else - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add local.get $2 i32.const 65536 @@ -2137,13 +2137,12 @@ end end else - local.get $8 local.get $10 i32.const 1 i32.shl + local.get $8 i32.add local.get $2 - local.get $2 i32.const 97 i32.sub i32.const 26 @@ -2154,6 +2153,7 @@ i32.shl i32.const -1 i32.xor + local.get $2 i32.and i32.store16 end diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 25b395397f..5c60c25417 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -703,10 +703,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 @@ -2404,10 +2404,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 c59961e8d7..706cb511ed 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1187,10 +1187,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 @@ -4403,10 +4403,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 @@ -5301,17 +5301,17 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $0 local.get $3 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u i32.store16 - local.get $5 local.get $3 i32.const 2 i32.shl + local.get $5 i32.add local.get $1 i32.store @@ -5355,10 +5355,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 @@ -5370,11 +5370,11 @@ i32.const 1280 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 @@ -5410,10 +5410,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 313f17898a..03734ad0c9 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -813,10 +813,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 @@ -4300,10 +4300,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 @@ -7822,8 +7822,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -7833,8 +7833,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 @@ -7900,8 +7900,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -7911,8 +7911,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 @@ -7941,8 +7941,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -7952,8 +7952,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 @@ -8006,11 +8006,11 @@ end ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) + local.get $0 i32.const 2704 local.get $1 call $~lib/array/Array#__get i64.extend_i32_s - local.get $0 i64.ne if i32.const 0 @@ -8020,8 +8020,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -8031,8 +8031,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 @@ -8099,8 +8099,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -8110,8 +8110,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 @@ -8141,8 +8141,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 @@ -8152,8 +8152,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 106322a73b..ba57d47a72 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.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 From 332e5a94f66aa89cc7e18ab98908023c7c039aa1 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 10:48:24 +0300 Subject: [PATCH 13/34] more --- cli/asc.js | 2 +- tests/compiler/std/map.optimized.wat | 60 ++++++++++++++-------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index a55f6ff53b..18053026e3 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -720,9 +720,9 @@ exports.main = function main(argv, options, callback) { add("dce"); add("remove-unused-brs"); add("remove-unused-names"); + add("optimize-instructions"); // differs // add("optimize-instructions"); // differs move 2 lines above add("inlining"); // differs - add("optimize-instructions"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 123b8c861a..40300c4362 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3309,25 +3309,25 @@ i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 0 i32.store offset=8 - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 - local.get $3 + local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -3354,13 +3354,13 @@ i32.load offset=4 i32.add i32.load8_s - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -3385,17 +3385,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -3405,7 +3405,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -3598,7 +3598,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -4516,25 +4516,25 @@ i32.const 10 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 0 i32.store offset=8 - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 - local.get $3 + local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -4561,13 +4561,13 @@ i32.load offset=4 i32.add i32.load8_u - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -4592,17 +4592,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -4612,7 +4612,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -4797,7 +4797,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release From d1e56da2e201eb521df44d76a17c58b1057cc8fb Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 11:03:38 +0300 Subject: [PATCH 14/34] post-finalize unnecessary blocks --- cli/asc.js | 7 +- tests/compiler/do.optimized.wat | 9 +- tests/compiler/for.optimized.wat | 9 +- .../implicit-getter-setter.optimized.wat | 9 +- tests/compiler/issues/1095.optimized.wat | 9 +- tests/compiler/managed-cast.optimized.wat | 9 +- tests/compiler/rc/local-init.optimized.wat | 9 +- .../rc/logical-and-mismatch.optimized.wat | 9 +- .../rc/logical-or-mismatch.optimized.wat | 9 +- tests/compiler/rc/optimize.optimized.wat | 9 +- tests/compiler/rc/rereturn.optimized.wat | 9 +- .../rc/ternary-mismatch.optimized.wat | 9 +- tests/compiler/retain-return.optimized.wat | 9 +- tests/compiler/runtime-full.optimized.wat | 9 +- tests/compiler/std/array.optimized.wat | 27 +- tests/compiler/std/dataview.optimized.wat | 9 +- tests/compiler/std/libm.optimized.wat | 326 +++++++++--------- tests/compiler/std/math.optimized.wat | 326 +++++++++--------- .../std/string-encoding.optimized.wat | 9 +- tests/compiler/while.optimized.wat | 9 +- 20 files changed, 406 insertions(+), 424 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 18053026e3..4203a4ae8b 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -818,10 +818,6 @@ exports.main = function main(argv, options, callback) { } if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); - // rearrange / reduce switch cases again - add("remove-unused-brs"); - add("vacuum"); - // move some code after early return which potentially could reduce computations // do this after CFG cleanup (originally it was done before) // moved from (1) @@ -843,6 +839,9 @@ exports.main = function main(argv, options, callback) { add("precompute-propagate"); add("vacuum"); } + add("remove-unused-brs"); + add("remove-unused-names"); + add("vacuum"); add("optimize-instructions"); add("simplify-globals-optimizing"); } diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index b9ea3a90d5..a6ce3120c8 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1439,11 +1439,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1216 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index a6308a4c17..1f8ff14d7a 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1448,11 +1448,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1216 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 524d606be0..03bec93f4b 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1221,11 +1221,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1228 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1228 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index c698dce35f..f1e538cc13 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1038,11 +1038,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1260 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1260 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index dbe0d0dc8e..371527051c 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1156,11 +1156,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1276 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1276 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 12166f69cc..b0bc6f5ba6 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -996,11 +996,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1200 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1200 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index ac620a39e6..47c2540500 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1038,11 +1038,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1184 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index f98a906982..64924d5318 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1040,11 +1040,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1184 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 04df90aa1e..7112bdf734 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1091,11 +1091,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1204 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1204 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 89b0c2af83..881e84bada 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1137,11 +1137,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1220 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1220 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index aeddbf1cd8..396a7f7133 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1039,11 +1039,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1184 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a93c9f867f..c2930afceb 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1036,11 +1036,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1184 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1184 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 1388e52913..ab86e558f8 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1137,11 +1137,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1212 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1212 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 805f0d5710..9b6ad585e5 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4356,20 +4356,19 @@ i32.const 0 i32.ge_s if - block $while-break|1 - local.get $6 - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $5 - local.get $2 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 + local.get $6 + local.get $0 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $5 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if local.get $4 local.tee $3 i32.const 1 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index e06e0b8ac0..b70e6ee510 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -3469,11 +3469,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1520 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1520 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index e791c8f028..27a9d6bd18 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1863,8 +1863,8 @@ i32.wrap_i64 ) (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) + (local $1 f64) + (local $2 i64) (local $3 f64) (local $4 f64) (local $5 i32) @@ -1872,7 +1872,7 @@ (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -1899,38 +1899,38 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $4 f64.mul - local.tee $2 + local.tee $3 f64.sub - local.tee $4 + local.tee $1 f64.const 1 - local.get $4 - f64.sub - local.get $2 + local.get $1 f64.sub local.get $3 - local.get $3 + f64.sub + local.get $4 + local.get $4 f64.const 0.0416666666666666 - local.get $3 + local.get $4 f64.const -0.001388888888887411 - local.get $3 + local.get $4 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $4 f64.const 2.087572321298175e-09 - local.get $3 + local.get $4 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -1957,7 +1957,7 @@ return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -1976,17 +1976,17 @@ 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 $2 + local.tee $3 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -1999,27 +1999,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 $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -2032,42 +2032,42 @@ 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 $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $4 + local.set $1 end end - local.get $4 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $4 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -2079,7 +2079,7 @@ global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $3 + local.set $4 local.get $6 i32.const 1 i32.and @@ -2088,21 +2088,21 @@ local.get $0 local.get $0 f64.mul - local.tee $4 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $4 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -2110,11 +2110,11 @@ f64.add local.set $7 local.get $0 - local.get $4 + local.get $1 f64.const 0.5 - local.get $3 - f64.mul local.get $4 + f64.mul + local.get $1 local.get $0 f64.mul local.tee $0 @@ -2122,7 +2122,7 @@ f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -2135,38 +2135,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.mul - local.tee $4 + local.tee $1 f64.sub local.tee $7 f64.const 1 local.get $7 f64.sub - local.get $4 + local.get $1 f64.sub - local.get $2 - local.get $2 + 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 $4 - local.get $4 + local.tee $1 + local.get $1 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 @@ -2176,7 +2176,7 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -4375,8 +4375,8 @@ local.get $0 ) (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) + (local $1 f64) + (local $2 i64) (local $3 f64) (local $4 f64) (local $5 i32) @@ -4384,7 +4384,7 @@ (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -4410,34 +4410,34 @@ 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 $3 + local.set $1 local.get $0 - local.get $2 + local.get $3 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $2 local.get $3 + local.get $1 f64.mul f64.add f64.mul @@ -4454,7 +4454,7 @@ return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -4481,9 +4481,9 @@ local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 - f64.sub local.tee $3 + f64.sub + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4504,19 +4504,19 @@ local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4537,26 +4537,26 @@ local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $3 + local.set $1 end end - local.get $3 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 local.get $4 @@ -4564,7 +4564,7 @@ br $~lib/math/rempio2|inlined.1 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -4586,38 +4586,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 - f64.mul local.tee $3 + f64.mul + local.tee $1 f64.sub local.tee $7 f64.const 1 local.get $7 f64.sub - local.get $3 + local.get $1 f64.sub - local.get $2 - local.get $2 + 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 - f64.mul - local.tee $3 local.get $3 + local.get $3 + f64.mul + local.tee $1 + local.get $1 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 @@ -4637,21 +4637,21 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $3 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -4659,11 +4659,11 @@ f64.add local.set $7 local.get $0 - local.get $3 + local.get $1 f64.const 0.5 local.get $4 f64.mul - local.get $3 + local.get $1 local.get $0 f64.mul local.tee $0 @@ -4959,30 +4959,30 @@ f64.add ) (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 i32) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 31 i32.shr_u - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1072243195 i32.le_s if - local.get $3 + local.get $4 i32.const 1044381696 i32.lt_s if @@ -4995,7 +4995,7 @@ call $~lib/math/tan_kern return end - local.get $3 + local.get $4 i32.const 2146435072 i32.ge_s if @@ -5005,36 +5005,36 @@ return end block $~lib/math/rempio2|inlined.2 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1094263291 i32.lt_u if - local.get $3 + local.get $4 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 $4 + local.tee $5 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $5 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub - local.tee $6 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -5047,27 +5047,27 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $5 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $5 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 - local.get $5 + local.set $3 + local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $6 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -5080,54 +5080,54 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $5 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $5 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $6 + local.set $1 end end - local.get $6 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $6 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $5 i32.trunc_f64_s br $~lib/math/rempio2|inlined.2 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot - local.tee $3 + local.tee $4 i32.sub - local.get $3 - local.get $5 + local.get $4 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.and i32.const 1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index a54c44c373..7c24505715 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3568,8 +3568,8 @@ i32.wrap_i64 ) (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) + (local $1 f64) + (local $2 i64) (local $3 f64) (local $4 f64) (local $5 i32) @@ -3577,7 +3577,7 @@ (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -3604,38 +3604,38 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $4 f64.mul - local.tee $2 + local.tee $3 f64.sub - local.tee $4 + local.tee $1 f64.const 1 - local.get $4 - f64.sub - local.get $2 + local.get $1 f64.sub local.get $3 - local.get $3 + f64.sub + local.get $4 + local.get $4 f64.const 0.0416666666666666 - local.get $3 + local.get $4 f64.const -0.001388888888887411 - local.get $3 + local.get $4 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $4 f64.const 2.087572321298175e-09 - local.get $3 + local.get $4 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3662,7 +3662,7 @@ return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -3681,17 +3681,17 @@ 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 $2 + local.tee $3 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3704,27 +3704,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 $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3737,42 +3737,42 @@ 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 $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $4 + local.set $1 end end - local.get $4 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $4 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -3784,7 +3784,7 @@ global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $3 + local.set $4 local.get $6 i32.const 1 i32.and @@ -3793,21 +3793,21 @@ local.get $0 local.get $0 f64.mul - local.tee $4 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $4 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -3815,11 +3815,11 @@ f64.add local.set $7 local.get $0 - local.get $4 + local.get $1 f64.const 0.5 - local.get $3 - f64.mul local.get $4 + f64.mul + local.get $1 local.get $0 f64.mul local.tee $0 @@ -3827,7 +3827,7 @@ f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -3840,38 +3840,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.mul - local.tee $4 + local.tee $1 f64.sub local.tee $7 f64.const 1 local.get $7 f64.sub - local.get $4 + local.get $1 f64.sub - local.get $2 - local.get $2 + 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 $4 - local.get $4 + local.tee $1 + local.get $1 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 @@ -3881,7 +3881,7 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -9014,8 +9014,8 @@ call $std/math/check ) (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) + (local $1 f64) + (local $2 i64) (local $3 f64) (local $4 f64) (local $5 i32) @@ -9023,7 +9023,7 @@ (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -9049,34 +9049,34 @@ 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 $3 + local.set $1 local.get $0 - local.get $2 + local.get $3 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $2 local.get $3 + local.get $1 f64.mul f64.add f64.mul @@ -9093,7 +9093,7 @@ return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 @@ -9120,9 +9120,9 @@ local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 - f64.sub local.tee $3 + f64.sub + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9143,19 +9143,19 @@ local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9176,26 +9176,26 @@ local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $3 + local.set $1 end end - local.get $3 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 local.get $4 @@ -9203,7 +9203,7 @@ br $~lib/math/rempio2|inlined.1 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -9225,38 +9225,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 - f64.mul local.tee $3 + f64.mul + local.tee $1 f64.sub local.tee $7 f64.const 1 local.get $7 f64.sub - local.get $3 + local.get $1 f64.sub - local.get $2 - local.get $2 + 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 - f64.mul - local.tee $3 local.get $3 + local.get $3 + f64.mul + local.tee $1 + local.get $1 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 @@ -9276,21 +9276,21 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $3 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -9298,11 +9298,11 @@ f64.add local.set $7 local.get $0 - local.get $3 + local.get $1 f64.const 0.5 local.get $4 f64.mul - local.get $3 + local.get $1 local.get $0 f64.mul local.tee $0 @@ -9997,30 +9997,30 @@ f64.add ) (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) + (local $1 f64) + (local $2 i64) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 i32) local.get $0 i64.reinterpret_f64 - local.tee $1 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 31 i32.shr_u - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1072243195 i32.le_s if - local.get $3 + local.get $4 i32.const 1044381696 i32.lt_s if @@ -10033,7 +10033,7 @@ call $~lib/math/tan_kern return end - local.get $3 + local.get $4 i32.const 2146435072 i32.ge_s if @@ -10043,36 +10043,36 @@ return end block $~lib/math/rempio2|inlined.2 (result i32) - local.get $1 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1094263291 i32.lt_u if - local.get $3 + local.get $4 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 $4 + local.tee $5 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $5 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub - local.tee $6 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10085,27 +10085,27 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $5 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $5 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 - local.get $5 + local.set $3 + local.get $6 local.get $0 - local.get $2 + local.get $3 f64.sub - local.tee $6 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10118,54 +10118,54 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $5 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $5 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $3 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $3 f64.sub f64.sub - local.set $2 + local.set $3 local.get $0 - local.get $2 + local.get $3 f64.sub - local.set $6 + local.set $1 end end - local.get $6 + local.get $1 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $6 + local.get $1 f64.sub - local.get $2 + local.get $3 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $5 i32.trunc_f64_s br $~lib/math/rempio2|inlined.2 end i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot - local.tee $3 + local.tee $4 i32.sub - local.get $3 - local.get $5 + local.get $4 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.and i32.const 1 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 5c60c25417..3e70885080 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -3188,11 +3188,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 22060 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 22060 + i32.ge_u + if local.get $1 i32.const 16 i32.sub diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index ba57d47a72..f0aa8ecd34 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1467,11 +1467,10 @@ i32.load offset=16 local.tee $1 if - block $__inlined_func$~lib/rt/pure/__visit - local.get $1 - i32.const 1216 - i32.lt_u - br_if $__inlined_func$~lib/rt/pure/__visit + local.get $1 + i32.const 1216 + i32.ge_u + if local.get $1 i32.const 16 i32.sub From 756104a92078f17cfb6ddfb1cabe7664862c7d1d Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 11:14:07 +0300 Subject: [PATCH 15/34] do optimize-added-constants later --- cli/asc.js | 14 +-- tests/compiler/memcpy.optimized.wat | 108 +++++++----------- tests/compiler/number.optimized.wat | 8 +- tests/compiler/resolve-binary.optimized.wat | 8 +- .../resolve-elementaccess.optimized.wat | 8 +- tests/compiler/resolve-ternary.optimized.wat | 14 +-- tests/compiler/std/array.optimized.wat | 22 ++-- tests/compiler/std/arraybuffer.optimized.wat | 8 +- tests/compiler/std/dataview.optimized.wat | 30 +++-- tests/compiler/std/map.optimized.wat | 12 +- tests/compiler/std/pointer.optimized.wat | 13 +-- tests/compiler/std/set.optimized.wat | 12 +- .../std/string-casemapping.optimized.wat | 6 +- tests/compiler/std/string.optimized.wat | 22 ++-- tests/compiler/std/typedarray.optimized.wat | 16 ++- tests/compiler/wasi/trace.optimized.wat | 8 +- 16 files changed, 133 insertions(+), 176 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 4203a4ae8b..2e709b0940 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -732,13 +732,6 @@ exports.main = function main(argv, options, callback) { } else { add("precompute"); } - if (module.getLowMemoryUnused()) { - if (optimizeLevel >= 3 || shrinkLevel >= 1) { - add("optimize-added-constants-propagate"); - } else { - add("optimize-added-constants"); - } - } // this will be done later (1) // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); @@ -791,6 +784,13 @@ exports.main = function main(argv, options, callback) { if (optimizeLevel >= 2 || shrinkLevel >= 2) { add("inlining-optimizing"); } + if (module.getLowMemoryUnused()) { + if (optimizeLevel >= 3 || shrinkLevel >= 1) { + add("optimize-added-constants-propagate"); + } else { + add("optimize-added-constants"); + } + } // "duplicate-function-elimination" will better done later // add("duplicate-function-elimination"); add("duplicate-import-elimination"); diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 244c3aca52..8952f746c9 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -195,23 +195,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 local.get $2 i32.const 3 i32.sub @@ -290,23 +286,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 local.get $2 i32.const 2 i32.sub @@ -613,23 +605,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 end local.get $2 i32.const 8 @@ -700,23 +688,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 end local.get $2 i32.const 4 @@ -747,23 +731,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 end local.get $2 i32.const 2 @@ -774,23 +754,19 @@ i32.load8_u i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $3 - i32.const 1 + local.tee $4 + i32.const 2 i32.add local.set $0 local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 1 + local.tee $3 + i32.const 2 i32.add local.set $1 - local.get $3 local.get $4 - i32.load8_u - i32.store8 + local.get $3 + i32.load8_u offset=1 + i32.store8 offset=1 end local.get $2 i32.const 1 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 3be345959d..2f2e2f7af1 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1058,9 +1058,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -1086,7 +1086,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1114,9 +1114,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -1142,7 +1142,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index aafa02de05..d3c058da49 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1072,9 +1072,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -1100,7 +1100,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1128,9 +1128,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -1156,7 +1156,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 81dfd0adef..0c3de288a8 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1172,9 +1172,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -1200,7 +1200,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1228,9 +1228,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -1256,7 +1256,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 2401cbf8a9..cbe21af35f 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -2011,9 +2011,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -2039,7 +2039,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -2067,9 +2067,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -2095,7 +2095,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -2456,16 +2456,14 @@ 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.add 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 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 9b6ad585e5..a0ea34d085 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -6736,9 +6736,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -6764,7 +6764,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -6792,9 +6792,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -6820,7 +6820,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -16125,16 +16125,14 @@ 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.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $switch$1$default end local.get $1 - i32.load + i32.load offset=16 local.tee $1 if local.get $1 @@ -16145,15 +16143,15 @@ unreachable end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load offset=4 + i32.load offset=20 local.tee $2 local.get $1 - i32.load offset=12 + i32.load offset=28 i32.const 2 i32.shl i32.add @@ -16178,7 +16176,7 @@ end end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $3 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 1beb99cfd4..04336871b4 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1936,16 +1936,14 @@ block $switch$1$case$5 block $switch$1$case$4 local.get $0 - i32.const 16 - i32.add local.tee $1 i32.const 8 - i32.sub + i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$default end local.get $1 - i32.load + i32.load offset=16 local.tee $1 if local.get $1 @@ -1954,7 +1952,7 @@ br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index b70e6ee510..69ada309dd 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1118,13 +1118,13 @@ i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 i32.store8 - local.get $2 + local.get $1 + local.tee $2 i32.const 4 i32.add - local.tee $1 i32.const 0 i32.store8 offset=3 local.get $2 @@ -1133,18 +1133,18 @@ local.get $2 i32.const 0 i32.store8 offset=2 - local.get $1 + local.get $2 i32.const 0 - i32.store8 offset=2 - local.get $1 + i32.store8 offset=6 + local.get $2 i32.const 0 - i32.store8 offset=1 + i32.store8 offset=5 local.get $2 i32.const 0 i32.store8 offset=3 - local.get $1 + local.get $2 i32.const 0 - i32.store8 + i32.store8 offset=4 local.get $0 i32.eqz if @@ -1163,25 +1163,23 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 + local.get $1 local.get $0 i32.load local.tee $3 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $3 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 i32.const 8 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 40300c4362..fb9a17fc02 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -13070,16 +13070,14 @@ 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.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $switch$1$default end local.get $1 - i32.load + i32.load offset=16 local.tee $1 if local.get $1 @@ -13090,15 +13088,15 @@ unreachable end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit local.get $1 - i32.load offset=8 + i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 07910cd0c7..28130fa71a 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -362,7 +362,6 @@ local.get $0 i32.const 4 i32.add - local.tee $1 i32.const 0 i32.store8 offset=3 local.get $0 @@ -371,18 +370,18 @@ local.get $0 i32.const 0 i32.store8 offset=2 - local.get $1 + local.get $0 i32.const 0 - i32.store8 offset=2 - local.get $1 + i32.store8 offset=6 + local.get $0 i32.const 0 - i32.store8 offset=1 + i32.store8 offset=5 local.get $0 i32.const 0 i32.store8 offset=3 - local.get $1 + local.get $0 i32.const 0 - i32.store8 + i32.store8 offset=4 end global.get $std/pointer/one global.get $std/pointer/two diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index b073a33935..8c6e2c7102 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -9328,16 +9328,14 @@ 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.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $switch$1$default end local.get $1 - i32.load + i32.load offset=16 local.tee $1 if local.get $1 @@ -9348,15 +9346,15 @@ unreachable end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit local.get $1 - i32.load offset=8 + i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 55f30ddd8f..e39a1ffaa3 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -4860,16 +4860,14 @@ 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.add 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 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 706cb511ed..d406029cd7 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6326,9 +6326,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -6354,7 +6354,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -6382,9 +6382,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -6410,7 +6410,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -14287,16 +14287,14 @@ block $switch$1$case$6 block $switch$1$case$4 local.get $0 - i32.const 16 - i32.add local.tee $1 i32.const 8 - i32.sub + i32.add 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$6 $switch$1$case$7 $__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 + i32.load offset=16 local.tee $1 if local.get $1 @@ -14305,10 +14303,10 @@ br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load offset=4 + i32.load offset=20 local.tee $2 local.get $1 - i32.load offset=12 + i32.load offset=28 i32.const 2 i32.shl i32.add @@ -14333,12 +14331,12 @@ end end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 03734ad0c9..d7e5e72916 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -18546,9 +18546,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -18574,7 +18574,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -18602,9 +18602,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -18630,7 +18630,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -32117,16 +32117,14 @@ 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.add 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$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $folding-inner0 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $switch$1$default end local.get $1 - i32.load + i32.load offset=16 local.tee $1 if local.get $1 @@ -32137,7 +32135,7 @@ unreachable end local.get $1 - i32.load + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index b3af7776d7..a6b3c174ca 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1156,9 +1156,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $1 i32.const 4 i32.add - local.tee $1 local.get $3 i32.const 1 i32.sub @@ -1184,7 +1184,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1212,9 +1212,9 @@ i32.const 101 i32.store16 offset=2 local.get $0 + local.tee $2 i32.const 4 i32.add - local.tee $2 local.get $3 i32.const 1 i32.sub @@ -1240,7 +1240,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add From 21f02e3342e174cad094b94b3af1c05957de877b Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 13:08:19 +0300 Subject: [PATCH 16/34] cleanups --- cli/asc.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 2e709b0940..b3c889ca32 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -720,8 +720,7 @@ exports.main = function main(argv, options, callback) { add("dce"); add("remove-unused-brs"); add("remove-unused-names"); - add("optimize-instructions"); // differs - // add("optimize-instructions"); // differs move 2 lines above + add("optimize-instructions"); add("inlining"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); From 4aee967c47ab26512f09eb47e9f0a12bd0be221e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 17 Apr 2020 13:33:02 +0300 Subject: [PATCH 17/34] hide optimize-instructions for small opt levels --- cli/asc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index b3c889ca32..85dae3a960 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -771,7 +771,9 @@ exports.main = function main(argv, options, callback) { // } else { // add("precompute"); // } - add("optimize-instructions"); + if (optimizeLevel >= 3) { + add("optimize-instructions"); + } if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("rse"); } From 0eb474c4d9e60020cd22521377a0a6659b0129a3 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 10:54:17 +0300 Subject: [PATCH 18/34] add code-folding --- cli/asc.js | 3 + tests/compiler/managed-cast.optimized.wat | 110 +-- tests/compiler/retain-release.optimized.wat | 4 - tests/compiler/std/string.optimized.wat | 873 ++++++++++---------- 4 files changed, 487 insertions(+), 503 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 85dae3a960..2975ebd598 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -718,6 +718,9 @@ exports.main = function main(argv, options, callback) { add("post-assemblyscript"); } add("dce"); + if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs + add("code-folding"); + } add("remove-unused-brs"); add("remove-unused-names"); add("optimize-instructions"); diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 371527051c..8b2396be02 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1017,7 +1017,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 @@ -1048,62 +1047,63 @@ call $managed-cast/Cat#constructor local.tee $1 local.set $0 - 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 - call $managed-cast/Cat#constructor - local.tee $0 - call $~lib/rt/__instanceof - i32.eqz - if - i32.const 0 - i32.const 1200 - i32.const 41 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - call $managed-cast/Cat#constructor - local.tee $7 - call $~lib/rt/__instanceof - i32.eqz - if - i32.const 0 - i32.const 1200 - i32.const 47 - i32.const 30 - call $~lib/builtins/abort - unreachable + 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 - 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 $0 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1200 + i32.const 36 + i32.const 9 + call $~lib/builtins/abort + unreachable end - i32.const 0 - i32.const 1200 - i32.const 36 - i32.const 9 - call $~lib/builtins/abort - unreachable + call $managed-cast/Cat#constructor + local.tee $0 + call $~lib/rt/__instanceof + i32.eqz + if + i32.const 0 + i32.const 1200 + i32.const 41 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + call $managed-cast/Cat#constructor + local.tee $7 + call $~lib/rt/__instanceof + i32.eqz + if + i32.const 0 + i32.const 1200 + i32.const 47 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + 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 $0 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release ) (func $~start global.get $~started diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index db8dcdcc7e..a6195302f5 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -182,10 +182,6 @@ loop $for-loop|1 local.get $0 if - block $for-continue|1 - local.get $0 - br_if $for-continue|1 - end local.get $1 i32.const 1 i32.add diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index d406029cd7..a2dd7909dd 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2480,60 +2480,36 @@ (local $3 f64) (local $4 i32) (local $5 f64) - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.eqz - if - f64.const nan:0x8000000000000 - return - end - local.get $0 - i32.load16_u - local.set $2 - f64.const 1 - local.set $5 - loop $while-continue|0 - local.get $2 - call $~lib/util/string/isSpace - if - local.get $0 - i32.const 2 - i32.add - local.tee $0 - i32.load16_u - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|0 - end - end - local.get $2 - i32.const 45 - i32.eq - if - local.get $1 - i32.const 1 - i32.sub + block $folding-inner0 + local.get $0 + call $~lib/string/String#get:length local.tee $1 i32.eqz - if - f64.const nan:0x8000000000000 - return - end - f64.const -1 - local.set $5 + br_if $folding-inner0 local.get $0 - i32.const 2 - i32.add - local.tee $0 i32.load16_u local.set $2 - else + f64.const 1 + local.set $5 + loop $while-continue|0 + local.get $2 + call $~lib/util/string/isSpace + if + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|0 + end + end local.get $2 - i32.const 43 + i32.const 45 i32.eq if local.get $1 @@ -2541,48 +2517,75 @@ i32.sub local.tee $1 i32.eqz - if - f64.const nan:0x8000000000000 - return - end + br_if $folding-inner0 + f64.const -1 + local.set $5 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u local.set $2 + else + local.get $2 + i32.const 43 + i32.eq + if + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.eqz + br_if $folding-inner0 + local.get $0 + i32.const 2 + i32.add + local.tee $0 + i32.load16_u + local.set $2 + end end - end - local.get $1 - i32.const 2 - i32.gt_s - i32.const 0 - local.get $2 - i32.const 48 - i32.eq - select - if (result i32) - block $break|1 (result i32) - block $case3|1 - block $case2|1 - block $case1|1 - local.get $0 - i32.load16_u offset=2 - i32.const 32 - i32.or - local.tee $2 - i32.const 98 - i32.ne - if - local.get $2 - i32.const 111 - i32.eq - br_if $case1|1 - local.get $2 - i32.const 120 - i32.eq - br_if $case2|1 - br $case3|1 + local.get $1 + i32.const 2 + i32.gt_s + i32.const 0 + local.get $2 + i32.const 48 + i32.eq + select + if (result i32) + block $break|1 (result i32) + block $case3|1 + block $case2|1 + block $case1|1 + local.get $0 + i32.load16_u offset=2 + i32.const 32 + i32.or + local.tee $2 + i32.const 98 + i32.ne + if + local.get $2 + i32.const 111 + i32.eq + br_if $case1|1 + local.get $2 + i32.const 120 + i32.eq + br_if $case2|1 + br $case3|1 + end + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 2 + i32.sub + local.set $1 + i32.const 2 + br $break|1 end local.get $0 i32.const 4 @@ -2592,7 +2595,7 @@ i32.const 2 i32.sub local.set $1 - i32.const 2 + i32.const 8 br $break|1 end local.get $0 @@ -2603,91 +2606,83 @@ i32.const 2 i32.sub local.set $1 - i32.const 8 + i32.const 16 br $break|1 end - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.sub - local.set $1 - i32.const 16 - br $break|1 + i32.const 10 end + else i32.const 10 end - else - i32.const 10 - end - local.set $4 - loop $while-continue|2 - block $while-break|2 - local.get $1 - local.tee $2 - i32.const 1 - i32.sub - local.set $1 - local.get $2 - if - local.get $0 - i32.load16_u + local.set $4 + loop $while-continue|2 + block $while-break|2 + local.get $1 local.tee $2 - i32.const 48 + i32.const 1 i32.sub - i32.const 10 - i32.lt_u - if (result i32) - local.get $2 + local.set $1 + local.get $2 + if + local.get $0 + i32.load16_u + local.tee $2 i32.const 48 i32.sub - else - local.get $2 - i32.const 65 - i32.sub - i32.const 25 - i32.le_u + i32.const 10 + i32.lt_u if (result i32) local.get $2 - i32.const 55 + i32.const 48 i32.sub else local.get $2 - i32.const 97 + i32.const 65 i32.sub i32.const 25 - i32.gt_u - br_if $while-break|2 - local.get $2 - i32.const 87 - i32.sub + i32.le_u + if (result i32) + local.get $2 + i32.const 55 + i32.sub + else + local.get $2 + i32.const 97 + i32.sub + i32.const 25 + i32.gt_u + br_if $while-break|2 + local.get $2 + i32.const 87 + i32.sub + end end + local.tee $2 + local.get $4 + i32.ge_u + br_if $while-break|2 + local.get $3 + local.get $4 + f64.convert_i32_s + f64.mul + local.get $2 + f64.convert_i32_u + f64.add + local.set $3 + local.get $0 + i32.const 2 + i32.add + local.set $0 + br $while-continue|2 end - local.tee $2 - local.get $4 - i32.ge_u - br_if $while-break|2 - local.get $3 - local.get $4 - f64.convert_i32_s - f64.mul - local.get $2 - f64.convert_i32_u - f64.add - local.set $3 - local.get $0 - i32.const 2 - i32.add - local.set $0 - br $while-continue|2 end end + local.get $5 + local.get $3 + f64.mul + return end - local.get $5 - local.get $3 - f64.mul + f64.const nan:0x8000000000000 ) (func $~lib/util/string/strtol (result i32) (local $0 i32) @@ -2698,60 +2693,36 @@ (local $5 i32) i32.const 2912 local.set $5 - i32.const 2912 - call $~lib/string/String#get:length - local.tee $0 - i32.eqz - if - i32.const 0 - return - end - i32.const 2912 - i32.load16_u - local.set $1 - i32.const 1 - local.set $4 - loop $while-continue|0 - local.get $1 - call $~lib/util/string/isSpace - if - local.get $5 - i32.const 2 - i32.add - local.tee $5 - i32.load16_u - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $1 - i32.const 45 - i32.eq - if - local.get $0 - i32.const 1 - i32.sub + block $folding-inner0 + i32.const 2912 + call $~lib/string/String#get:length local.tee $0 i32.eqz - if - i32.const 0 - return - end - i32.const -1 - local.set $4 - local.get $5 - i32.const 2 - i32.add - local.tee $5 + br_if $folding-inner0 + i32.const 2912 i32.load16_u local.set $1 - else + i32.const 1 + local.set $4 + loop $while-continue|0 + local.get $1 + call $~lib/util/string/isSpace + if + local.get $5 + i32.const 2 + i32.add + local.tee $5 + i32.load16_u + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end local.get $1 - i32.const 43 + i32.const 45 i32.eq if local.get $0 @@ -2759,48 +2730,75 @@ i32.sub local.tee $0 i32.eqz - if - i32.const 0 - return - end + br_if $folding-inner0 + i32.const -1 + local.set $4 local.get $5 i32.const 2 i32.add local.tee $5 i32.load16_u local.set $1 + else + local.get $1 + i32.const 43 + i32.eq + if + local.get $0 + i32.const 1 + i32.sub + local.tee $0 + i32.eqz + br_if $folding-inner0 + local.get $5 + i32.const 2 + i32.add + local.tee $5 + i32.load16_u + local.set $1 + end end - end - local.get $0 - i32.const 2 - i32.gt_s - i32.const 0 - local.get $1 - i32.const 48 - i32.eq - select - if (result i32) - block $break|1 (result i32) - block $case3|1 - block $case2|1 - block $case1|1 - local.get $5 - i32.load16_u offset=2 - i32.const 32 - i32.or - local.tee $1 - i32.const 98 - i32.ne - if - local.get $1 - i32.const 111 - i32.eq - br_if $case1|1 - local.get $1 - i32.const 120 - i32.eq - br_if $case2|1 - br $case3|1 + local.get $0 + i32.const 2 + i32.gt_s + i32.const 0 + local.get $1 + i32.const 48 + i32.eq + select + if (result i32) + block $break|1 (result i32) + block $case3|1 + block $case2|1 + block $case1|1 + local.get $5 + i32.load16_u offset=2 + i32.const 32 + i32.or + local.tee $1 + i32.const 98 + i32.ne + if + local.get $1 + i32.const 111 + i32.eq + br_if $case1|1 + local.get $1 + i32.const 120 + i32.eq + br_if $case2|1 + br $case3|1 + end + local.get $5 + i32.const 4 + i32.add + local.set $5 + local.get $0 + i32.const 2 + i32.sub + local.set $0 + i32.const 2 + br $break|1 end local.get $5 i32.const 4 @@ -2810,7 +2808,7 @@ i32.const 2 i32.sub local.set $0 - i32.const 2 + i32.const 8 br $break|1 end local.get $5 @@ -2821,89 +2819,81 @@ i32.const 2 i32.sub local.set $0 - i32.const 8 + i32.const 16 br $break|1 end - local.get $5 - i32.const 4 - i32.add - local.set $5 - local.get $0 - i32.const 2 - i32.sub - local.set $0 - i32.const 16 - br $break|1 + i32.const 10 end + else i32.const 10 end - else - i32.const 10 - end - local.set $3 - loop $while-continue|2 - block $while-break|2 - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - if - local.get $5 - i32.load16_u + local.set $3 + loop $while-continue|2 + block $while-break|2 + local.get $0 local.tee $1 - i32.const 48 + i32.const 1 i32.sub - i32.const 10 - i32.lt_u - if (result i32) - local.get $1 + local.set $0 + local.get $1 + if + local.get $5 + i32.load16_u + local.tee $1 i32.const 48 i32.sub - else - local.get $1 - i32.const 65 - i32.sub - i32.const 25 - i32.le_u + i32.const 10 + i32.lt_u if (result i32) local.get $1 - i32.const 55 + i32.const 48 i32.sub else local.get $1 - i32.const 97 + i32.const 65 i32.sub i32.const 25 - i32.gt_u - br_if $while-break|2 - local.get $1 - i32.const 87 - i32.sub + i32.le_u + if (result i32) + local.get $1 + i32.const 55 + i32.sub + else + local.get $1 + i32.const 97 + i32.sub + i32.const 25 + i32.gt_u + br_if $while-break|2 + local.get $1 + i32.const 87 + i32.sub + end end + local.tee $1 + local.get $3 + i32.ge_u + br_if $while-break|2 + local.get $1 + local.get $2 + local.get $3 + i32.mul + i32.add + local.set $2 + local.get $5 + i32.const 2 + i32.add + local.set $5 + br $while-continue|2 end - local.tee $1 - local.get $3 - i32.ge_u - br_if $while-break|2 - local.get $1 - local.get $2 - local.get $3 - i32.mul - i32.add - local.set $2 - local.get $5 - i32.const 2 - i32.add - local.set $5 - br $while-continue|2 end end + local.get $2 + local.get $4 + i32.mul + return end - local.get $2 - local.get $4 - i32.mul + i32.const 0 ) (func $~lib/util/string/strtol (result i64) (local $0 i32) @@ -2914,60 +2904,36 @@ (local $5 i32) i32.const 2960 local.set $5 - i32.const 2960 - call $~lib/string/String#get:length - local.tee $0 - i32.eqz - if - i64.const 0 - return - end - i32.const 2960 - i32.load16_u - local.set $1 - i64.const 1 - local.set $4 - loop $while-continue|0 - local.get $1 - call $~lib/util/string/isSpace - if - local.get $5 - i32.const 2 - i32.add - local.tee $5 - i32.load16_u - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $1 - i32.const 45 - i32.eq - if - local.get $0 - i32.const 1 - i32.sub + block $folding-inner0 + i32.const 2960 + call $~lib/string/String#get:length local.tee $0 i32.eqz - if - i64.const 0 - return - end - i64.const -1 - local.set $4 - local.get $5 - i32.const 2 - i32.add - local.tee $5 + br_if $folding-inner0 + i32.const 2960 i32.load16_u local.set $1 - else + i64.const 1 + local.set $4 + loop $while-continue|0 + local.get $1 + call $~lib/util/string/isSpace + if + local.get $5 + i32.const 2 + i32.add + local.tee $5 + i32.load16_u + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end local.get $1 - i32.const 43 + i32.const 45 i32.eq if local.get $0 @@ -2975,48 +2941,75 @@ i32.sub local.tee $0 i32.eqz - if - i64.const 0 - return - end + br_if $folding-inner0 + i64.const -1 + local.set $4 local.get $5 i32.const 2 i32.add local.tee $5 i32.load16_u local.set $1 + else + local.get $1 + i32.const 43 + i32.eq + if + local.get $0 + i32.const 1 + i32.sub + local.tee $0 + i32.eqz + br_if $folding-inner0 + local.get $5 + i32.const 2 + i32.add + local.tee $5 + i32.load16_u + local.set $1 + end end - end - local.get $0 - i32.const 2 - i32.gt_s - i32.const 0 - local.get $1 - i32.const 48 - i32.eq - select - if (result i32) - block $break|1 (result i32) - block $case3|1 - block $case2|1 - block $case1|1 - local.get $5 - i32.load16_u offset=2 - i32.const 32 - i32.or - local.tee $1 - i32.const 98 - i32.ne - if - local.get $1 - i32.const 111 - i32.eq - br_if $case1|1 - local.get $1 - i32.const 120 - i32.eq - br_if $case2|1 - br $case3|1 + local.get $0 + i32.const 2 + i32.gt_s + i32.const 0 + local.get $1 + i32.const 48 + i32.eq + select + if (result i32) + block $break|1 (result i32) + block $case3|1 + block $case2|1 + block $case1|1 + local.get $5 + i32.load16_u offset=2 + i32.const 32 + i32.or + local.tee $1 + i32.const 98 + i32.ne + if + local.get $1 + i32.const 111 + i32.eq + br_if $case1|1 + local.get $1 + i32.const 120 + i32.eq + br_if $case2|1 + br $case3|1 + end + local.get $5 + i32.const 4 + i32.add + local.set $5 + local.get $0 + i32.const 2 + i32.sub + local.set $0 + i32.const 2 + br $break|1 end local.get $5 i32.const 4 @@ -3026,7 +3019,7 @@ i32.const 2 i32.sub local.set $0 - i32.const 2 + i32.const 8 br $break|1 end local.get $5 @@ -3037,91 +3030,83 @@ i32.const 2 i32.sub local.set $0 - i32.const 8 + i32.const 16 br $break|1 end - local.get $5 - i32.const 4 - i32.add - local.set $5 - local.get $0 - i32.const 2 - i32.sub - local.set $0 - i32.const 16 - br $break|1 + i32.const 10 end + else i32.const 10 end - else - i32.const 10 - end - local.set $3 - loop $while-continue|2 - block $while-break|2 - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - if - local.get $5 - i32.load16_u + local.set $3 + loop $while-continue|2 + block $while-break|2 + local.get $0 local.tee $1 - i32.const 48 + i32.const 1 i32.sub - i32.const 10 - i32.lt_u - if (result i32) - local.get $1 + local.set $0 + local.get $1 + if + local.get $5 + i32.load16_u + local.tee $1 i32.const 48 i32.sub - else - local.get $1 - i32.const 65 - i32.sub - i32.const 25 - i32.le_u + i32.const 10 + i32.lt_u if (result i32) local.get $1 - i32.const 55 + i32.const 48 i32.sub else local.get $1 - i32.const 97 + i32.const 65 i32.sub i32.const 25 - i32.gt_u - br_if $while-break|2 - local.get $1 - i32.const 87 - i32.sub + i32.le_u + if (result i32) + local.get $1 + i32.const 55 + i32.sub + else + local.get $1 + i32.const 97 + i32.sub + i32.const 25 + i32.gt_u + br_if $while-break|2 + local.get $1 + i32.const 87 + i32.sub + end end + local.tee $1 + local.get $3 + i32.ge_u + br_if $while-break|2 + local.get $1 + i64.extend_i32_u + local.get $2 + local.get $3 + i64.extend_i32_s + i64.mul + i64.add + local.set $2 + local.get $5 + i32.const 2 + i32.add + local.set $5 + br $while-continue|2 end - local.tee $1 - local.get $3 - i32.ge_u - br_if $while-break|2 - local.get $1 - i64.extend_i32_u - local.get $2 - local.get $3 - i64.extend_i32_s - i64.mul - i64.add - local.set $2 - local.get $5 - i32.const 2 - i32.add - local.set $5 - br $while-continue|2 end end + local.get $2 + local.get $4 + i64.mul + return end - local.get $2 - local.get $4 - i64.mul + i64.const 0 ) (func $~lib/math/ipow32 (param $0 i32) (result i32) (local $1 i32) From a82b1924818118c09475c05549f86a66d9f4cb90 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 11:00:18 +0300 Subject: [PATCH 19/34] move upper --- cli/asc.js | 6 +++--- tests/compiler/assert-nonnull.optimized.wat | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 2975ebd598..811d2b3a70 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -711,6 +711,9 @@ exports.main = function main(argv, options, callback) { add("rse"); add("vacuum"); } + if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs + add("code-folding"); + } if (hasARC) { // differs if (optimizeLevel < 3) { add("flatten"); @@ -718,9 +721,6 @@ exports.main = function main(argv, options, callback) { add("post-assemblyscript"); } add("dce"); - if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs - add("code-folding"); - } add("remove-unused-brs"); add("remove-unused-names"); add("optimize-instructions"); diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index a0409f68d3..7422e8e1e5 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -145,8 +145,8 @@ br_if $folding-inner0 local.get $1 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz br_if $folding-inner0 i32.load @@ -172,8 +172,8 @@ br_if $folding-inner0 local.get $1 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz br_if $folding-inner0 i32.load From 87e9e79f47bd62fc1b28ae024fe04751ee022959 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 11:04:50 +0300 Subject: [PATCH 20/34] use early code-folding --- cli/asc.js | 1 + tests/compiler/builtins.optimized.wat | 42 +- tests/compiler/number.optimized.wat | 42 +- tests/compiler/resolve-binary.optimized.wat | 42 +- .../resolve-elementaccess.optimized.wat | 42 +- .../resolve-function-expression.optimized.wat | 38 +- .../resolve-propertyaccess.optimized.wat | 42 +- tests/compiler/resolve-ternary.optimized.wat | 42 +- tests/compiler/resolve-unary.optimized.wat | 42 +- tests/compiler/std/array.optimized.wat | 462 +++++++++--------- tests/compiler/std/libm.optimized.wat | 128 ++--- tests/compiler/std/math.optimized.wat | 128 ++--- .../compiler/std/object-literal.optimized.wat | 40 +- tests/compiler/std/object.optimized.wat | 42 +- .../std/operator-overloading.optimized.wat | 128 ++--- .../std/string-casemapping.optimized.wat | 42 +- .../std/string-encoding.optimized.wat | 42 +- tests/compiler/std/string.optimized.wat | 188 ++++--- tests/compiler/std/symbol.optimized.wat | 42 +- tests/compiler/std/typedarray.optimized.wat | 198 ++++---- tests/compiler/typeof.optimized.wat | 42 +- 21 files changed, 887 insertions(+), 928 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 811d2b3a70..de58fdb4fa 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -703,6 +703,7 @@ exports.main = function main(argv, options, callback) { add("flatten"); // differs add("simplify-locals-notee-nostructure"); // differs add("vacuum"); // differs + add("code-folding"); add("flatten"); add("local-cse"); add("reorder-locals"); // differs diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index e73abb14d1..74821aee7a 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -146,30 +146,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $start:builtins~anonymous|0 nop diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 2f2e2f7af1..86a856737f 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -322,30 +322,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index d3c058da49..3f30383508 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -143,30 +143,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 0c3de288a8..fbf5477830 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1813,30 +1813,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index e955c83e87..6bb92a3959 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -211,26 +211,26 @@ 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 + call $~lib/string/String#get:length + local.tee $1 + i32.const 1152 + 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 + br $__inlined_func$~lib/string/String.__eq + end i32.const 0 - i32.const 0 - i32.const 1 - local.get $0 - select - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.const 1152 - call $~lib/string/String#get:length - i32.ne - br_if $__inlined_func$~lib/string/String.__eq - drop - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz end i32.eqz if diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 29b5faf506..2297f6e46d 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -301,30 +301,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $start:resolve-propertyaccess (local $0 i32) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index cbe21af35f..a8e9716842 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1275,30 +1275,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index c4ca539c77..148c781efa 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -308,30 +308,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $start:resolve-unary (local $0 i32) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a0ea34d085..73037dc08d 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1888,47 +1888,45 @@ (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=12 - local.tee $3 - 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 $3 - i32.lt_s + block $folding-inner0 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + i32.eq if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.get $1 + i32.const 1 + return + end + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__get - i32.ne + local.get $3 + i32.lt_s if - i32.const 0 - return + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + local.get $2 + call $~lib/array/Array#__get + i32.ne + br_if $folding-inner0 + 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 + return end - i32.const 1 + i32.const 0 ) (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -2028,51 +2026,49 @@ ) (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - i32.load offset=12 - local.tee $2 - 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 - end - loop $for-loop|0 - local.get $3 + block $folding-inner0 local.get $2 - i32.lt_s + i32.eqz if local.get $0 - local.get $3 - call $~lib/array/Array#__get + i32.load offset=12 + local.tee $2 local.get $1 - local.get $3 - call $~lib/array/Array#__get + i32.load offset=12 i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + i32.eq if - i32.const 0 + i32.const 1 return end + end + loop $for-loop|0 local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $3 + call $~lib/array/Array#__get + local.get $1 + local.get $3 + call $~lib/array/Array#__get + i32.ne + br_if $folding-inner0 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end end + i32.const 1 + return end - i32.const 1 + i32.const 0 ) (func $std/array/internalCapacity (param $0 i32) (result i32) local.get $0 @@ -5326,56 +5322,54 @@ (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 1 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - i32.eqz - local.get $0 - local.get $1 - i32.eq - select - select - if + block $folding-inner0 + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select + br_if $folding-inner0 + 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.eqz + local.get $2 + select + br_if $folding-inner0 + local.get $2 + i32.eqz + if + i32.const -1 + return + end + local.get $3 + i32.eqz + if + i32.const 1 + return + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + call $~lib/util/string/compareImpl 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.eqz - local.get $2 - select - if - i32.const 0 - return - end - local.get $2 - i32.eqz - if - i32.const -1 - return - end - local.get $3 - i32.eqz - if - i32.const 1 - return - end - local.get $0 - local.get $1 - 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 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5386,30 +5380,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -14389,63 +14381,63 @@ local.set $51 i32.const 0 local.set $60 - i32.const 0 - local.get $55 - i32.load offset=12 - local.tee $1 - local.get $51 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - i32.const 1 - local.get $51 - local.get $55 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|001 - local.get $60 - local.get $1 - i32.lt_s - if - local.get $55 + block $folding-inner0 + local.get $55 + i32.load offset=12 + local.tee $1 + local.get $51 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + i32.const 1 + local.get $51 + local.get $55 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|001 local.get $60 - call $~lib/array/Array#__get - local.tee $47 - local.get $47 - f32.ne - if (result i32) - local.get $51 + local.get $1 + i32.lt_s + if + local.get $55 local.get $60 call $~lib/array/Array#__get local.tee $47 local.get $47 f32.ne - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - local.get $55 - local.get $60 - call $~lib/array/Array#__get - local.get $51 + if (result i32) + local.get $51 + local.get $60 + call $~lib/array/Array#__get + local.tee $47 + local.get $47 + f32.ne + else + i32.const 0 + end + i32.eqz + if + local.get $55 + local.get $60 + call $~lib/array/Array#__get + local.get $51 + local.get $60 + call $~lib/array/Array#__get + f32.ne + br_if $folding-inner0 + end local.get $60 - call $~lib/array/Array#__get - f32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop + i32.const 1 + i32.add + local.set $60 + br $for-loop|001 end - local.get $60 - i32.const 1 - i32.add - local.set $60 - br $for-loop|001 end + i32.const 1 + br $__inlined_func$std/array/isArraysEqual end - i32.const 1 + i32.const 0 end i32.eqz if @@ -14593,63 +14585,63 @@ local.set $53 i32.const 0 local.set $60 - i32.const 0 - local.get $54 - i32.load offset=12 - local.tee $1 - local.get $53 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - i32.const 1 - local.get $53 - local.get $54 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|01 - local.get $60 - local.get $1 - i32.lt_s - if - local.get $54 + block $folding-inner01 + local.get $54 + i32.load offset=12 + local.tee $1 + local.get $53 + i32.load offset=12 + i32.ne + br_if $folding-inner01 + i32.const 1 + local.get $53 + local.get $54 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|025 local.get $60 - call $~lib/array/Array#__get - local.tee $42 - local.get $42 - f64.ne - if (result i32) - local.get $53 + local.get $1 + i32.lt_s + if + local.get $54 local.get $60 call $~lib/array/Array#__get local.tee $42 local.get $42 f64.ne - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - local.get $54 - local.get $60 - call $~lib/array/Array#__get - local.get $53 + if (result i32) + local.get $53 + local.get $60 + call $~lib/array/Array#__get + local.tee $42 + local.get $42 + f64.ne + else + i32.const 0 + end + i32.eqz + if + local.get $54 + local.get $60 + call $~lib/array/Array#__get + local.get $53 + local.get $60 + call $~lib/array/Array#__get + f64.ne + br_if $folding-inner01 + end local.get $60 - call $~lib/array/Array#__get - f64.ne - br_if $__inlined_func$std/array/isArraysEqual - drop + i32.const 1 + i32.add + local.set $60 + br $for-loop|025 end - local.get $60 - i32.const 1 - i32.add - local.set $60 - br $for-loop|01 end + i32.const 1 + br $__inlined_func$std/array/isArraysEqual end - i32.const 1 + i32.const 0 end i32.eqz if @@ -14997,7 +14989,7 @@ local.get $58 i32.load offset=12 local.set $1 - loop $for-loop|025 + loop $for-loop|03 local.get $60 local.get $1 i32.lt_s @@ -15031,7 +15023,7 @@ i32.const 1 i32.add local.set $60 - br $for-loop|025 + br $for-loop|03 end end i32.const 1 @@ -15065,7 +15057,7 @@ i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop - loop $for-loop|03 + loop $for-loop|04 local.get $60 local.get $1 i32.lt_s @@ -15096,7 +15088,7 @@ i32.const 1 i32.add local.set $60 - br $for-loop|03 + br $for-loop|04 end end i32.const 1 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 27a9d6bd18..a801aaf868 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -3410,10 +3410,10 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (local $7 f64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 f64) (local $11 i32) (local $12 f64) (local $13 i64) @@ -3495,10 +3495,10 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 + local.tee $8 local.get $13 i32.wrap_i64 local.tee $19 @@ -3511,12 +3511,12 @@ i32.const 1 local.get $19 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 @@ -3542,46 +3542,46 @@ 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 i32.const 2 local.get $19 - local.get $9 + local.get $8 local.get $5 select local.tee $5 local.get $11 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 + local.get $9 local.get $11 i32.shl i32.eq @@ -3595,7 +3595,7 @@ local.get $19 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -3611,7 +3611,7 @@ if local.get $1 f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s select @@ -3620,7 +3620,7 @@ local.get $1 f64.neg f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -3633,11 +3633,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 @@ -3649,7 +3649,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -3658,7 +3658,7 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if @@ -3694,7 +3694,7 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -3731,7 +3731,7 @@ end end f64.const 1 - local.set $6 + local.set $10 local.get $15 i32.const 0 i32.lt_s @@ -3753,13 +3753,13 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 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 @@ -3769,7 +3769,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -3781,7 +3781,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -3792,17 +3792,17 @@ i32.const 1072693247 i32.lt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -3812,17 +3812,17 @@ i32.const 1072693248 i32.gt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -3860,9 +3860,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $0 - local.get $7 + local.get $6 local.get $2 f64.sub f64.sub @@ -3890,7 +3890,7 @@ i32.const 1023 i32.sub i32.add - local.set $8 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -3909,10 +3909,10 @@ i32.const 1 local.set $16 else - local.get $8 + local.get $7 i32.const 1 i32.add - local.set $8 + local.set $7 local.get $4 i32.const -1048576 i32.add @@ -3930,7 +3930,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.5 f64.const 1 local.get $16 @@ -3939,7 +3939,7 @@ f64.sub local.tee $2 f64.const 1 - local.get $7 + local.get $6 local.get $3 f64.add f64.div @@ -4007,7 +4007,7 @@ f64.mul f64.sub local.get $14 - local.get $7 + local.get $6 local.get $0 local.get $3 f64.sub @@ -4027,14 +4027,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.mul local.tee $2 local.get $3 - local.get $7 + local.get $6 f64.mul local.get $0 - local.get $7 + local.get $6 f64.const 3 f64.sub local.get $20 @@ -4076,7 +4076,7 @@ select local.tee $2 f64.add - local.get $8 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -4084,9 +4084,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $3 - local.get $7 + local.get $6 local.get $0 f64.sub local.get $2 @@ -4104,7 +4104,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $7 + local.get $6 f64.mul local.get $1 local.get $2 @@ -4112,7 +4112,7 @@ f64.add local.tee $1 local.get $0 - local.get $7 + local.get $6 f64.mul local.tee $3 f64.add @@ -4169,15 +4169,15 @@ local.get $11 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 $8 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if @@ -4189,7 +4189,7 @@ i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -4200,7 +4200,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -4208,7 +4208,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -4217,14 +4217,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $8 + local.tee $7 i32.sub - local.get $8 + local.get $7 local.get $11 i32.const 0 i32.lt_s select - local.set $8 + local.set $7 local.get $3 local.get $0 f64.sub @@ -4258,7 +4258,7 @@ local.get $3 f64.mul local.set $0 - local.get $6 + local.get $10 f64.const 1 local.get $3 local.get $3 @@ -4307,7 +4307,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $8 + local.get $7 i32.const 20 i32.shl i32.add @@ -4318,7 +4318,7 @@ i32.le_s if (result f64) local.get $0 - local.get $8 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -4335,14 +4335,14 @@ f64.mul return end - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $6 + local.get $10 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 7c24505715..dc93df3808 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -7102,10 +7102,10 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (local $7 f64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 f64) (local $11 i32) (local $12 f64) (local $13 i64) @@ -7187,10 +7187,10 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 + local.tee $8 local.get $13 i32.wrap_i64 local.tee $19 @@ -7203,12 +7203,12 @@ i32.const 1 local.get $19 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 @@ -7234,46 +7234,46 @@ 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 i32.const 2 local.get $19 - local.get $9 + local.get $8 local.get $5 select local.tee $5 local.get $11 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 + local.get $9 local.get $11 i32.shl i32.eq @@ -7287,7 +7287,7 @@ local.get $19 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -7303,7 +7303,7 @@ if local.get $1 f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s select @@ -7312,7 +7312,7 @@ local.get $1 f64.neg f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -7325,11 +7325,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 @@ -7341,7 +7341,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -7350,7 +7350,7 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if @@ -7386,7 +7386,7 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -7423,7 +7423,7 @@ end end f64.const 1 - local.set $6 + local.set $10 local.get $15 i32.const 0 i32.lt_s @@ -7445,13 +7445,13 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 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 @@ -7461,7 +7461,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -7473,7 +7473,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -7484,17 +7484,17 @@ i32.const 1072693247 i32.lt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -7504,17 +7504,17 @@ i32.const 1072693248 i32.gt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -7552,9 +7552,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $0 - local.get $7 + local.get $6 local.get $2 f64.sub f64.sub @@ -7582,7 +7582,7 @@ i32.const 1023 i32.sub i32.add - local.set $8 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -7601,10 +7601,10 @@ i32.const 1 local.set $16 else - local.get $8 + local.get $7 i32.const 1 i32.add - local.set $8 + local.set $7 local.get $4 i32.const -1048576 i32.add @@ -7622,7 +7622,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.5 f64.const 1 local.get $16 @@ -7631,7 +7631,7 @@ f64.sub local.tee $2 f64.const 1 - local.get $7 + local.get $6 local.get $3 f64.add f64.div @@ -7699,7 +7699,7 @@ f64.mul f64.sub local.get $14 - local.get $7 + local.get $6 local.get $0 local.get $3 f64.sub @@ -7719,14 +7719,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.mul local.tee $2 local.get $3 - local.get $7 + local.get $6 f64.mul local.get $0 - local.get $7 + local.get $6 f64.const 3 f64.sub local.get $20 @@ -7768,7 +7768,7 @@ select local.tee $2 f64.add - local.get $8 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -7776,9 +7776,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $3 - local.get $7 + local.get $6 local.get $0 f64.sub local.get $2 @@ -7796,7 +7796,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $7 + local.get $6 f64.mul local.get $1 local.get $2 @@ -7804,7 +7804,7 @@ f64.add local.tee $1 local.get $0 - local.get $7 + local.get $6 f64.mul local.tee $3 f64.add @@ -7861,15 +7861,15 @@ local.get $11 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 $8 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if @@ -7881,7 +7881,7 @@ i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -7892,7 +7892,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -7900,7 +7900,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -7909,14 +7909,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $8 + local.tee $7 i32.sub - local.get $8 + local.get $7 local.get $11 i32.const 0 i32.lt_s select - local.set $8 + local.set $7 local.get $3 local.get $0 f64.sub @@ -7950,7 +7950,7 @@ local.get $3 f64.mul local.set $0 - local.get $6 + local.get $10 f64.const 1 local.get $3 local.get $3 @@ -7999,7 +7999,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $8 + local.get $7 i32.const 20 i32.shl i32.add @@ -8010,7 +8010,7 @@ i32.le_s if (result f64) local.get $0 - local.get $8 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -8027,14 +8027,14 @@ f64.mul return end - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $6 + local.get $10 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index c8704cde5a..6139deaace 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -207,31 +207,31 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1040 i32.eq br_if $__inlined_func$~lib/string/String.__eq drop + block $folding-inner0 + i32.const 0 + i32.const 1 + local.get $1 + select + br_if $folding-inner0 + local.get $1 + call $~lib/string/String#get:length + local.tee $0 + i32.const 1040 + call $~lib/string/String#get:length + i32.ne + br_if $folding-inner0 + local.get $1 + local.get $0 + call $~lib/util/string/compareImpl + i32.eqz + br $__inlined_func$~lib/string/String.__eq + end i32.const 0 - i32.const 0 - i32.const 1 - local.get $0 - select - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.const 1040 - call $~lib/string/String#get:length - i32.ne - br_if $__inlined_func$~lib/string/String.__eq - drop - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz end i32.eqz if diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 54b91ded84..856757bab1 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -157,28 +157,28 @@ 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 + 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 + br $__inlined_func$~lib/string/String.__eq + end i32.const 0 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - br_if $__inlined_func$~lib/string/String.__eq - drop - i32.const 0 - 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 $__inlined_func$~lib/string/String.__eq - drop - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz end ) (func $start:std/object diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 6f4f2cdbe3..6d1b020b39 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -238,10 +238,10 @@ (local $4 i32) (local $5 i32) (local $6 f64) - (local $7 f64) + (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 f64) (local $11 i32) (local $12 f64) (local $13 i64) @@ -323,10 +323,10 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 + local.tee $8 local.get $13 i32.wrap_i64 local.tee $19 @@ -339,12 +339,12 @@ i32.const 1 local.get $19 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 @@ -370,46 +370,46 @@ 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 i32.const 2 local.get $19 - local.get $9 + local.get $8 local.get $5 select local.tee $5 local.get $11 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 + local.get $9 local.get $11 i32.shl i32.eq @@ -423,7 +423,7 @@ local.get $19 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -439,7 +439,7 @@ if local.get $1 f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s select @@ -448,7 +448,7 @@ local.get $1 f64.neg f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -461,11 +461,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 @@ -477,7 +477,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -486,7 +486,7 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if @@ -522,7 +522,7 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -559,7 +559,7 @@ end end f64.const 1 - local.set $6 + local.set $10 local.get $15 i32.const 0 i32.lt_s @@ -581,13 +581,13 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 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 @@ -597,7 +597,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -609,7 +609,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -620,17 +620,17 @@ i32.const 1072693247 i32.lt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -640,17 +640,17 @@ i32.const 1072693248 i32.gt_s if - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $6 + local.get $10 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 @@ -688,9 +688,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $0 - local.get $7 + local.get $6 local.get $2 f64.sub f64.sub @@ -718,7 +718,7 @@ i32.const 1023 i32.sub i32.add - local.set $8 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -737,10 +737,10 @@ i32.const 1 local.set $16 else - local.get $8 + local.get $7 i32.const 1 i32.add - local.set $8 + local.set $7 local.get $4 i32.const -1048576 i32.add @@ -758,7 +758,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.5 f64.const 1 local.get $16 @@ -767,7 +767,7 @@ f64.sub local.tee $2 f64.const 1 - local.get $7 + local.get $6 local.get $3 f64.add f64.div @@ -835,7 +835,7 @@ f64.mul f64.sub local.get $14 - local.get $7 + local.get $6 local.get $0 local.get $3 f64.sub @@ -855,14 +855,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.mul local.tee $2 local.get $3 - local.get $7 + local.get $6 f64.mul local.get $0 - local.get $7 + local.get $6 f64.const 3 f64.sub local.get $20 @@ -904,7 +904,7 @@ select local.tee $2 f64.add - local.get $8 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -912,9 +912,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 + local.set $6 local.get $3 - local.get $7 + local.get $6 local.get $0 f64.sub local.get $2 @@ -932,7 +932,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $7 + local.get $6 f64.mul local.get $1 local.get $2 @@ -940,7 +940,7 @@ f64.add local.tee $1 local.get $0 - local.get $7 + local.get $6 f64.mul local.tee $3 f64.add @@ -997,15 +997,15 @@ local.get $11 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 $8 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if @@ -1017,7 +1017,7 @@ i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -1028,7 +1028,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -1036,7 +1036,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -1045,14 +1045,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $8 + local.tee $7 i32.sub - local.get $8 + local.get $7 local.get $11 i32.const 0 i32.lt_s select - local.set $8 + local.set $7 local.get $3 local.get $0 f64.sub @@ -1086,7 +1086,7 @@ local.get $3 f64.mul local.set $0 - local.get $6 + local.get $10 f64.const 1 local.get $3 local.get $3 @@ -1135,7 +1135,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $8 + local.get $7 i32.const 20 i32.shl i32.add @@ -1146,7 +1146,7 @@ i32.le_s if (result f64) local.get $0 - local.get $8 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -1163,14 +1163,14 @@ f64.mul return end - local.get $6 + local.get $10 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $6 + local.get $10 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index e39a1ffaa3..f1a75f4fc3 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2271,30 +2271,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/util/string/stagedBinaryLookup (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 3e70885080..1b2a67a397 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1585,30 +1585,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $std/string-encoding/testUTF16DecodeUnsafe (local $0 i32) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index a2dd7909dd..44905e78c2 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -545,31 +545,29 @@ 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 + 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 i32.const 0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz return end - local.get $0 i32.const 0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz ) (func $~lib/string/String.__not (param $0 i32) (result i32) local.get $0 @@ -4030,96 +4028,92 @@ (func $~lib/string/String.__gt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 1 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - i32.eqz - local.get $0 - local.get $1 - i32.eq - select - select - if + block $folding-inner0 + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select + br_if $folding-inner0 + local.get $0 + call $~lib/string/String#get:length + local.tee $2 + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/string/String#get:length + local.tee $3 + i32.eqz + if + i32.const 1 + return + end + local.get $0 i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.eqz - if + local.get $1 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + call $~lib/util/string/compareImpl i32.const 0 + i32.gt_s return end - local.get $1 - call $~lib/string/String#get:length - local.tee $3 - i32.eqz - if - i32.const 1 - return - end - local.get $0 - i32.const 0 - local.get $1 - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - call $~lib/util/string/compareImpl i32.const 0 - i32.gt_s ) (func $~lib/string/String.__lt (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 1 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - i32.eqz - local.get $0 - local.get $1 - i32.eq - select - select - if + block $folding-inner0 + i32.const 1 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + i32.eqz + local.get $0 + local.get $1 + i32.eq + select + select + br_if $folding-inner0 + local.get $1 + call $~lib/string/String#get:length + local.tee $2 + i32.eqz + br_if $folding-inner0 + local.get $0 + call $~lib/string/String#get:length + local.tee $3 + i32.eqz + if + i32.const 1 + return + end + local.get $0 i32.const 0 - return - end - local.get $1 - call $~lib/string/String#get:length - local.tee $2 - i32.eqz - if + local.get $1 + local.get $3 + local.get $2 + local.get $3 + local.get $2 + i32.lt_s + select + call $~lib/util/string/compareImpl i32.const 0 + i32.lt_s return end - local.get $0 - call $~lib/string/String#get:length - local.tee $3 - i32.eqz - if - i32.const 1 - return - end - local.get $0 i32.const 0 - local.get $1 - local.get $3 - local.get $2 - local.get $3 - local.get $2 - i32.lt_s - select - call $~lib/util/string/compareImpl - i32.const 0 - i32.lt_s ) (func $~lib/string/String#repeat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index bc2ead8916..f9b982e4fd 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -490,30 +490,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/map/Map<~lib/string/String,usize>#find (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d7e5e72916..988afcb6f6 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -3166,56 +3166,54 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=8 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.load offset=8 - local.set $3 - 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.set $4 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - i32.const 1376 - i32.const 1536 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $1 + block $folding-inner0 + local.get $0 + i32.load offset=8 + local.get $1 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.load offset=8 + local.set $3 + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__unchecked_get - local.get $4 - i32.ne + local.get $3 + i32.lt_s if - i32.const 0 - return + local.get $0 + local.get $2 + call $~lib/typedarray/Int8Array#__get + local.set $4 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + i32.const 1376 + i32.const 1536 + i32.const 104 + i32.const 42 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.get $4 + i32.ne + br_if $folding-inner0 + 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 + return end - i32.const 1 + i32.const 0 ) (func $~lib/typedarray/Int8Array#subarray (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -3405,46 +3403,44 @@ (func $std/typedarray/isInt32ArrayEqual (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - 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 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - 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.get $1 + block $folding-inner0 + local.get $1 + i32.load offset=12 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ne + br_if $folding-inner0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__get - i32.ne + local.get $3 + i32.lt_s if - i32.const 0 - return + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#__get + local.get $1 + local.get $2 + call $~lib/array/Array#__get + i32.ne + br_if $folding-inner0 + 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 + return end - i32.const 1 + i32.const 0 ) (func $~lib/typedarray/Int32Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -16670,30 +16666,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $~lib/util/number/utoa32 (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 70df7eb429..ef8bc54d29 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -110,30 +110,28 @@ 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 + 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 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.const 0 ) (func $start:typeof (local $0 i32) From b40f77eb9329ad4b67d5f44e9c9c5fcd5dbf6ffb Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 11:12:02 +0300 Subject: [PATCH 21/34] move code folding after flatten --- cli/asc.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index de58fdb4fa..e216b78ece 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -703,7 +703,7 @@ exports.main = function main(argv, options, callback) { add("flatten"); // differs add("simplify-locals-notee-nostructure"); // differs add("vacuum"); // differs - add("code-folding"); + add("code-folding"); // differs add("flatten"); add("local-cse"); add("reorder-locals"); // differs @@ -712,9 +712,6 @@ exports.main = function main(argv, options, callback) { add("rse"); add("vacuum"); } - if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs - add("code-folding"); - } if (hasARC) { // differs if (optimizeLevel < 3) { add("flatten"); From 087372b623af15ff5e20d4fb99942028447afa43 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 14:18:23 +0300 Subject: [PATCH 22/34] add merge-locals --- cli/asc.js | 1 + tests/compiler/do.optimized.wat | 3 +- tests/compiler/for.optimized.wat | 3 +- .../implicit-getter-setter.optimized.wat | 3 +- tests/compiler/issues/1095.optimized.wat | 3 +- tests/compiler/managed-cast.optimized.wat | 3 +- tests/compiler/rc/local-init.optimized.wat | 3 +- .../rc/logical-and-mismatch.optimized.wat | 3 +- .../rc/logical-or-mismatch.optimized.wat | 3 +- tests/compiler/rc/optimize.optimized.wat | 3 +- tests/compiler/rc/rereturn.optimized.wat | 3 +- .../rc/ternary-mismatch.optimized.wat | 3 +- tests/compiler/resolve-ternary.optimized.wat | 3 +- tests/compiler/retain-return.optimized.wat | 3 +- tests/compiler/runtime-full.optimized.wat | 3 +- tests/compiler/std/array.optimized.wat | 36 ++++---- tests/compiler/std/arraybuffer.optimized.wat | 5 +- tests/compiler/std/dataview.optimized.wat | 31 ++++--- tests/compiler/std/map.optimized.wat | 9 +- tests/compiler/std/set.optimized.wat | 9 +- .../std/string-casemapping.optimized.wat | 88 +++++++++---------- .../std/string-encoding.optimized.wat | 3 +- tests/compiler/std/string.optimized.wat | 36 ++++---- tests/compiler/std/typedarray.optimized.wat | 5 +- tests/compiler/while.optimized.wat | 3 +- 25 files changed, 122 insertions(+), 146 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index e216b78ece..8b13d519cb 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -834,6 +834,7 @@ exports.main = function main(argv, options, callback) { add("dae-optimizing"); add("precompute-propagate"); add("vacuum"); + add("merge-locals"); add("coalesce-locals"); add("merge-locals"); add("simplify-locals-nostructure"); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index a6ce3120c8..89af7877dd 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1429,13 +1429,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 1f8ff14d7a..2a8bdf7dc8 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1438,13 +1438,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 03bec93f4b..454a19e0c9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1211,13 +1211,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index f1e538cc13..555c78f813 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1028,13 +1028,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$4 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 8b2396be02..0ed2b2c8b5 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1146,13 +1146,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index b0bc6f5ba6..c49de915d2 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -986,13 +986,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 47c2540500..6a906a7a83 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1028,13 +1028,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 64924d5318..946c55476b 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1030,13 +1030,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 7112bdf734..adad34ed33 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1081,13 +1081,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 881e84bada..160b6e5eb6 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1127,13 +1127,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 396a7f7133..ae587c4e1a 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1029,13 +1029,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index a8e9716842..d0f016834d 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -2454,13 +2454,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index c2930afceb..a73cfa0150 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1026,13 +1026,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index ab86e558f8..fa32ef6903 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1127,13 +1127,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 73037dc08d..efc18ede9c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -16086,10 +16086,9 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 268435455 i32.and local.set $1 @@ -16117,13 +16116,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if @@ -16134,44 +16132,44 @@ end unreachable end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=20 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=28 i32.const 2 i32.shl i32.add - local.set $4 + local.set $3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.lt_u if - local.get $2 + local.get $1 i32.load - local.tee $5 + local.tee $4 if - local.get $5 + local.get $4 call $~lib/rt/pure/__visit end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 br $while-continue|0 end end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit end - local.get $3 + local.get $2 i32.const -2147483648 i32.and if @@ -16201,7 +16199,7 @@ local.get $1 i32.const 1 i32.sub - local.get $3 + local.get $2 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 04336871b4..e7ad203e1f 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1936,13 +1936,12 @@ block $switch$1$case$5 block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if @@ -1951,7 +1950,7 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 69ada309dd..f112291106 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1118,31 +1118,31 @@ 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.tee $2 + local.get $2 + local.tee $1 i32.const 4 i32.add i32.const 0 i32.store8 offset=3 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=1 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=2 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=6 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=5 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=3 - local.get $2 + local.get $1 i32.const 0 i32.store8 offset=4 local.get $0 @@ -1163,23 +1163,23 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $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 @@ -3457,13 +3457,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index fb9a17fc02..cf89502f7c 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -13070,13 +13070,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if @@ -13087,15 +13086,15 @@ end unreachable end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit - local.get $1 + local.get $0 i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit end diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 8c6e2c7102..e895d0b7da 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -9328,13 +9328,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner1 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if @@ -9345,15 +9344,15 @@ end unreachable end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit - local.get $1 + local.get $0 i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit end diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index f1a75f4fc3..24dfa80862 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2344,14 +2344,14 @@ i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $9 + local.set $10 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 @@ -2361,7 +2361,7 @@ i32.shr_u if block $for-continue|0 - local.get $6 + local.get $5 local.get $7 i32.const 1 i32.sub @@ -2375,7 +2375,7 @@ select if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add @@ -2386,10 +2386,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 $4 i32.const 1023 i32.and @@ -2406,8 +2406,8 @@ i32.const 131072 i32.ge_u if - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add @@ -2417,10 +2417,10 @@ i32.shl i32.or i32.store - local.get $8 + local.get $11 i32.const 1 i32.add - local.set $8 + local.set $11 br $for-continue|0 end end @@ -2429,24 +2429,24 @@ i32.const 304 i32.eq if - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add i32.const 50790505 i32.store - local.get $8 + local.get $11 i32.const 1 i32.add - local.set $8 + local.set $11 else local.get $2 i32.const 931 i32.eq if - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add @@ -2457,11 +2457,11 @@ 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.set $9 i32.const 0 - local.get $6 + local.get $5 + local.tee $6 local.tee $2 i32.const 30 i32.sub @@ -2470,10 +2470,10 @@ local.get $1 i32.gt_s select - local.set $11 + local.set $8 loop $while-continue|1 local.get $2 - local.get $11 + local.get $8 i32.gt_s if block $~lib/util/string/codePointBefore|inlined.0 (result i32) @@ -2571,7 +2571,7 @@ br_if $~lib/util/string/isFinalSigma|inlined.0 drop i32.const 1 - local.set $10 + local.set $9 end local.get $2 local.get $1 @@ -2585,10 +2585,11 @@ end end i32.const 0 - local.get $10 + local.get $9 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop + local.get $6 i32.const 1 i32.add local.tee $2 @@ -2600,10 +2601,10 @@ local.get $7 i32.lt_s select - local.set $5 + local.set $6 loop $while-continue|2 local.get $2 - local.get $5 + local.get $6 i32.lt_s if local.get $0 @@ -2702,8 +2703,8 @@ i32.const 25 i32.le_u if - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add @@ -2721,16 +2722,16 @@ i32.const 65536 i32.lt_s if - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add local.get $2 i32.store16 else - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add @@ -2751,18 +2752,18 @@ i32.shl i32.or i32.store - local.get $8 + local.get $11 i32.const 1 i32.add - local.set $8 + local.set $11 end end end end end else - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl i32.add @@ -2779,19 +2780,19 @@ i32.or i32.store16 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 - local.get $8 + local.set $5 + local.get $11 i32.const 1 i32.add - local.set $8 + local.set $11 br $for-loop|0 end end - local.get $9 - local.get $8 + local.get $10 + local.get $11 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc @@ -4858,13 +4859,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 1b2a67a397..0e16ace529 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -3176,13 +3176,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 44905e78c2..bd8abab68c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -14235,10 +14235,9 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 268435455 i32.and local.set $1 @@ -14266,13 +14265,12 @@ block $switch$1$case$6 block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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$6 $switch$1$case$7 $__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 + local.get $0 i32.load offset=16 local.tee $1 if @@ -14281,47 +14279,47 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=20 - local.tee $2 - local.get $1 + local.tee $1 + local.get $0 i32.load offset=28 i32.const 2 i32.shl i32.add - local.set $4 + local.set $3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.lt_u if - local.get $2 + local.get $1 i32.load - local.tee $5 + local.tee $4 if - local.get $5 + local.get $4 call $~lib/rt/pure/__visit end - local.get $2 + local.get $1 i32.const 4 i32.add - local.set $2 + local.set $1 br $while-continue|0 end end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end unreachable end - local.get $3 + local.get $2 i32.const -2147483648 i32.and if @@ -14351,7 +14349,7 @@ local.get $1 i32.const 1 i32.sub - local.get $3 + local.get $2 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 988afcb6f6..0d87d01bf5 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -32111,13 +32111,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $switch$1$case$4 $folding-inner0 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $switch$1$default end - local.get $1 + local.get $0 i32.load offset=16 local.tee $1 if @@ -32128,7 +32127,7 @@ end unreachable end - local.get $1 + local.get $0 i32.load offset=16 call $~lib/rt/pure/__visit end diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index f0aa8ecd34..9ea9f5e9ae 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1457,13 +1457,12 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - local.tee $1 i32.const 8 i32.add 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 + local.get $0 i32.load offset=16 local.tee $1 if From 3d47f2d610ee297a764246329de0cd7bc9d482e1 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 14:20:01 +0300 Subject: [PATCH 23/34] actually move it --- cli/asc.js | 1 - tests/compiler/std/string-casemapping.optimized.wat | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 8b13d519cb..0028b791d5 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -836,7 +836,6 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("merge-locals"); add("coalesce-locals"); - add("merge-locals"); add("simplify-locals-nostructure"); add("inlining-optimizing"); add("precompute-propagate"); diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 24dfa80862..3968bce926 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2457,11 +2457,11 @@ block $~lib/util/string/isFinalSigma|inlined.0 (result i32) local.get $0 local.set $4 + local.get $5 i32.const 0 local.set $9 i32.const 0 local.get $5 - local.tee $6 local.tee $2 i32.const 30 i32.sub @@ -2485,7 +2485,7 @@ i32.le_s br_if $~lib/util/string/codePointBefore|inlined.0 drop - local.get $0 + local.get $4 local.get $1 i32.const 1 i32.sub @@ -2505,7 +2505,7 @@ i32.ge_s i32.and if - local.get $0 + local.get $4 local.get $1 i32.const 2 i32.sub @@ -2589,7 +2589,6 @@ i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop - local.get $6 i32.const 1 i32.add local.tee $2 @@ -2607,7 +2606,7 @@ local.get $6 i32.lt_s if - local.get $0 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2625,7 +2624,7 @@ i32.ne i32.and if - local.get $0 + local.get $4 local.get $2 i32.const 1 i32.shl From 3406f9fd97278583b7bca7491025644d06ed8fc8 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 18:47:01 +0300 Subject: [PATCH 24/34] add vacuum after propagate pass --- cli/asc.js | 1 + tests/compiler/std/libm.optimized.wat | 240 ++++++------ tests/compiler/std/math.optimized.wat | 520 +++++++++++++------------- 3 files changed, 375 insertions(+), 386 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 0028b791d5..04deb0dbd3 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -732,6 +732,7 @@ exports.main = function main(argv, options, callback) { } else { add("precompute"); } + add("vacuum"); // differs // this will be done later (1) // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index a801aaf868..93499c11aa 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1899,38 +1899,38 @@ local.get $0 local.get $0 f64.mul - local.tee $4 - f64.mul local.tee $3 + f64.mul + local.tee $4 f64.sub local.tee $1 f64.const 1 local.get $1 f64.sub - local.get $3 - f64.sub - local.get $4 local.get $4 + f64.sub + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $4 + local.get $3 f64.const -0.001388888888887411 - local.get $4 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $4 - local.get $4 - f64.mul - local.tee $3 + local.get $3 local.get $3 f64.mul - f64.const -2.7557314351390663e-07 + local.tee $4 local.get $4 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $3 f64.const 2.087572321298175e-09 - local.get $4 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -1976,15 +1976,15 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $4 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -1999,25 +1999,25 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $6 local.get $0 - local.get $3 + local.get $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -2032,24 +2032,24 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $0 - local.get $3 + local.get $4 f64.sub local.set $1 end @@ -2059,10 +2059,10 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end @@ -2077,54 +2077,53 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 + local.set $3 global.get $~lib/math/rempio2_y1 local.set $4 local.get $6 i32.const 1 i32.and if (result f64) - f64.const 0.00833333333332249 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 local.get $0 + f64.const 0.5 + local.get $4 f64.mul - local.tee $1 - f64.const -1.984126982985795e-04 local.get $1 + f64.const 0.00833333333332249 + local.get $0 + f64.const -1.984126982985795e-04 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $1 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -2132,10 +2131,10 @@ else f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $3 + local.tee $0 f64.mul local.tee $1 f64.sub @@ -2145,28 +2144,28 @@ f64.sub local.get $1 f64.sub - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.const 0.0416666666666666 - local.get $3 + local.get $0 f64.const -0.001388888888887411 - local.get $3 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.mul local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $0 f64.const 2.087572321298175e-09 - local.get $3 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -2175,7 +2174,7 @@ f64.mul f64.add f64.mul - local.get $0 + local.get $3 local.get $4 f64.mul f64.sub @@ -4406,11 +4405,17 @@ local.get $0 return end - f64.const 0.00833333333332249 + local.get $0 local.get $0 local.get $0 f64.mul local.tee $3 + local.get $0 + f64.mul + f64.const -0.16666666666666632 + local.get $3 + f64.const 0.00833333333332249 + local.get $3 f64.const -1.984126982985795e-04 local.get $3 f64.const 2.7557313707070068e-06 @@ -4430,14 +4435,6 @@ f64.add f64.mul f64.add - local.set $1 - local.get $0 - local.get $3 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $3 - local.get $1 f64.mul f64.add f64.mul @@ -4473,15 +4470,15 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $4 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -4496,25 +4493,25 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $6 local.get $0 - local.get $3 + local.get $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -4529,24 +4526,24 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $0 - local.get $3 + local.get $4 f64.sub local.set $1 end @@ -4556,10 +4553,10 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end @@ -4574,7 +4571,7 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 + local.set $3 global.get $~lib/math/rempio2_y1 local.set $4 local.get $6 @@ -4583,10 +4580,10 @@ if (result f64) f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $3 + local.tee $0 f64.mul local.tee $1 f64.sub @@ -4596,28 +4593,28 @@ f64.sub local.get $1 f64.sub - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.const 0.0416666666666666 - local.get $3 + local.get $0 f64.const -0.001388888888887411 - local.get $3 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.mul local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $0 f64.const 2.087572321298175e-09 - local.get $3 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -4626,54 +4623,53 @@ f64.mul f64.add f64.mul - local.get $0 + local.get $3 local.get $4 f64.mul f64.sub f64.add f64.add else - f64.const 0.00833333333332249 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 local.get $0 + f64.const 0.5 + local.get $4 f64.mul - local.tee $1 - f64.const -1.984126982985795e-04 local.get $1 + f64.const 0.00833333333332249 + local.get $0 + f64.const -1.984126982985795e-04 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $1 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index dc93df3808..51f891ee93 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3604,38 +3604,38 @@ local.get $0 local.get $0 f64.mul - local.tee $4 - f64.mul local.tee $3 + f64.mul + local.tee $4 f64.sub local.tee $1 f64.const 1 local.get $1 f64.sub - local.get $3 - f64.sub - local.get $4 local.get $4 + f64.sub + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $4 + local.get $3 f64.const -0.001388888888887411 - local.get $4 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $4 - local.get $4 - f64.mul - local.tee $3 + local.get $3 local.get $3 f64.mul - f64.const -2.7557314351390663e-07 + local.tee $4 local.get $4 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $3 f64.const 2.087572321298175e-09 - local.get $4 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3681,15 +3681,15 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $4 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -3704,25 +3704,25 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $6 local.get $0 - local.get $3 + local.get $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -3737,24 +3737,24 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $0 - local.get $3 + local.get $4 f64.sub local.set $1 end @@ -3764,10 +3764,10 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end @@ -3782,54 +3782,53 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 + local.set $3 global.get $~lib/math/rempio2_y1 local.set $4 local.get $6 i32.const 1 i32.and if (result f64) - f64.const 0.00833333333332249 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 local.get $0 + f64.const 0.5 + local.get $4 f64.mul - local.tee $1 - f64.const -1.984126982985795e-04 local.get $1 + f64.const 0.00833333333332249 + local.get $0 + f64.const -1.984126982985795e-04 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $1 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3837,10 +3836,10 @@ else f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $3 + local.tee $0 f64.mul local.tee $1 f64.sub @@ -3850,28 +3849,28 @@ f64.sub local.get $1 f64.sub - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.const 0.0416666666666666 - local.get $3 + local.get $0 f64.const -0.001388888888887411 - local.get $3 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.mul local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $0 f64.const 2.087572321298175e-09 - local.get $3 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3880,7 +3879,7 @@ f64.mul f64.add f64.mul - local.get $0 + local.get $3 local.get $4 f64.mul f64.sub @@ -9045,11 +9044,17 @@ local.get $0 return end - f64.const 0.00833333333332249 + local.get $0 local.get $0 local.get $0 f64.mul local.tee $3 + local.get $0 + f64.mul + f64.const -0.16666666666666632 + local.get $3 + f64.const 0.00833333333332249 + local.get $3 f64.const -1.984126982985795e-04 local.get $3 f64.const 2.7557313707070068e-06 @@ -9069,14 +9074,6 @@ f64.add f64.mul f64.add - local.set $1 - local.get $0 - local.get $3 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $3 - local.get $1 f64.mul f64.add f64.mul @@ -9112,15 +9109,15 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $4 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $4 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -9135,25 +9132,25 @@ i32.const 16 i32.gt_u if - local.get $4 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $6 local.get $0 - local.get $3 + local.get $4 f64.sub local.tee $1 i64.reinterpret_f64 @@ -9168,24 +9165,24 @@ i32.const 49 i32.gt_u if - local.get $4 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $4 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $3 + local.get $4 f64.sub f64.sub - local.set $3 + local.set $4 local.get $0 - local.get $3 + local.get $4 f64.sub local.set $1 end @@ -9195,10 +9192,10 @@ local.get $0 local.get $1 f64.sub - local.get $3 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 - local.get $4 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end @@ -9213,7 +9210,7 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 + local.set $3 global.get $~lib/math/rempio2_y1 local.set $4 local.get $6 @@ -9222,10 +9219,10 @@ if (result f64) f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $3 + local.tee $0 f64.mul local.tee $1 f64.sub @@ -9235,28 +9232,28 @@ f64.sub local.get $1 f64.sub - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.const 0.0416666666666666 - local.get $3 + local.get $0 f64.const -0.001388888888887411 - local.get $3 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.mul local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $0 f64.const 2.087572321298175e-09 - local.get $3 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -9265,54 +9262,53 @@ f64.mul f64.add f64.mul - local.get $0 + local.get $3 local.get $4 f64.mul f64.sub f64.add f64.add else - f64.const 0.00833333333332249 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $3 + f64.mul + local.set $1 + local.get $3 local.get $0 + f64.const 0.5 + local.get $4 f64.mul - local.tee $1 - f64.const -1.984126982985795e-04 local.get $1 + f64.const 0.00833333333332249 + local.get $0 + f64.const -1.984126982985795e-04 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $1 - f64.const 0.5 - local.get $4 - f64.mul - local.get $1 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -10645,32 +10641,32 @@ ) (func $~lib/math/NativeMath.sincos (param $0 f64) (local $1 f64) - (local $2 i64) - (local $3 f64) + (local $2 f64) + (local $3 i64) (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 i32) + (local $5 i32) + (local $6 i32) + (local $7 f64) + (local $8 f64) (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $5 i32.const 31 i32.shr_u - local.set $8 - local.get $7 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $7 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $7 + local.get $5 i32.const 1044816030 i32.lt_u if @@ -10680,38 +10676,36 @@ global.set $~lib/math/NativeMath.sincos_cos return end - f64.const 0.00833333333332249 + local.get $0 local.get $0 local.get $0 f64.mul - local.tee $6 + local.tee $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 $6 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $6 - local.get $6 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $6 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $3 - local.get $0 - local.get $6 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $6 - local.get $3 f64.mul f64.add f64.mul @@ -10722,38 +10716,38 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $2 f64.mul - local.tee $1 + local.tee $4 f64.sub - local.tee $5 + local.tee $1 f64.const 1 - local.get $5 - f64.sub local.get $1 f64.sub - local.get $3 - local.get $3 + local.get $4 + f64.sub + 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 $5 - local.get $5 + local.tee $4 + local.get $4 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 @@ -10771,7 +10765,7 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $7 + local.get $5 i32.const 2139095040 i32.ge_u if @@ -10785,36 +10779,36 @@ return end block $~lib/math/rempio2|inlined.3 (result i32) - local.get $2 + local.get $3 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $7 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $7 + 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 f64.mul f64.nearest - local.tee $1 + local.tee $2 f64.const 1.5707963267341256 f64.mul f64.sub - local.tee $3 - local.get $1 + local.tee $0 + local.get $2 f64.const 6.077100506506192e-11 f64.mul - local.tee $5 + local.tee $4 f64.sub - local.tee $0 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10827,27 +10821,27 @@ i32.const 16 i32.gt_u if - local.get $1 + local.get $2 f64.const 2.0222662487959506e-21 f64.mul - local.get $3 - local.get $3 - local.get $1 + local.get $0 + local.get $0 + local.get $2 f64.const 6.077100506303966e-11 f64.mul - local.tee $0 + local.tee $4 f64.sub - local.tee $3 + local.tee $0 f64.sub - local.get $0 + local.get $4 f64.sub f64.sub - local.set $5 - local.get $8 - local.get $3 - local.get $5 + local.set $4 + local.get $6 + local.get $0 + local.get $4 f64.sub - local.tee $0 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10860,137 +10854,135 @@ i32.const 49 i32.gt_u if - local.get $1 + local.get $2 f64.const 8.4784276603689e-32 f64.mul - local.get $3 - local.get $3 - local.get $1 + local.get $0 + local.get $0 + local.get $2 f64.const 2.0222662487111665e-21 f64.mul - local.tee $0 + local.tee $4 f64.sub - local.tee $3 + local.tee $0 f64.sub - local.get $0 + local.get $4 f64.sub f64.sub - local.set $5 - local.get $3 - local.get $5 + local.set $4 + local.get $0 + local.get $4 f64.sub - local.set $0 + local.set $1 end end - local.get $0 + local.get $1 global.set $~lib/math/rempio2_y0 - local.get $3 local.get $0 + local.get $1 f64.sub - local.get $5 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 - local.get $1 + local.get $2 i32.trunc_f64_s br $~lib/math/rempio2|inlined.3 end i32.const 0 - local.get $2 + local.get $3 call $~lib/math/pio2_large_quot - local.tee $7 + local.tee $5 i32.sub - local.get $7 - local.get $8 + local.get $5 + local.get $6 select end - local.set $8 + local.set $6 global.get $~lib/math/rempio2_y0 - local.tee $9 - f64.const 0.00833333333332249 - local.get $9 - local.get $9 - f64.mul local.tee $4 - f64.const -1.984126982985795e-04 local.get $4 + f64.mul + local.tee $0 + local.get $4 + f64.mul + local.set $2 + local.get $4 + local.get $0 + f64.const 0.5 + global.get $~lib/math/rempio2_y1 + local.tee $1 + f64.mul + local.get $2 + f64.const 0.00833333333332249 + local.get $0 + f64.const -1.984126982985795e-04 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $0 - local.get $4 - f64.const 0.5 - global.get $~lib/math/rempio2_y1 - local.tee $6 - local.tee $3 - f64.mul - local.get $4 - local.get $9 - f64.mul - local.tee $1 - local.get $0 f64.mul f64.sub f64.mul - local.get $3 - f64.sub local.get $1 + f64.sub + local.get $2 f64.const -0.16666666666666632 f64.mul f64.sub f64.sub - local.tee $5 - local.set $1 + local.tee $8 + local.set $0 f64.const 1 f64.const 0.5 - local.get $9 - local.get $9 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $2 f64.mul - local.tee $3 + local.tee $7 f64.sub - local.tee $0 + local.tee $9 f64.const 1 - local.get $0 + local.get $9 f64.sub - local.get $3 + local.get $7 f64.sub - local.get $4 - local.get $4 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $4 + local.get $2 f64.const -0.001388888888887411 - local.get $4 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $4 - local.get $4 + local.get $2 + local.get $2 f64.mul - local.tee $0 - local.get $0 + local.tee $7 + local.get $7 f64.mul f64.const -2.7557314351390663e-07 - local.get $4 + local.get $2 f64.const 2.087572321298175e-09 - local.get $4 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -10999,38 +10991,38 @@ f64.mul f64.add f64.mul - local.get $9 - local.get $6 + local.get $4 + local.get $1 f64.mul f64.sub f64.add f64.add - local.tee $0 - local.set $3 - local.get $8 + local.tee $2 + local.set $4 + local.get $6 i32.const 1 i32.and if - local.get $5 + local.get $8 f64.neg - local.set $3 - local.get $0 - local.set $1 + local.set $4 + local.get $2 + local.set $0 end - local.get $8 + local.get $6 i32.const 2 i32.and if (result f64) - local.get $3 + local.get $4 f64.neg - local.set $3 - local.get $1 + local.set $4 + local.get $0 f64.neg else - local.get $1 + local.get $0 end global.set $~lib/math/NativeMath.sincos_sin - local.get $3 + local.get $4 global.set $~lib/math/NativeMath.sincos_cos ) (func $std/math/test_sincos (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) From 4295c2bd278a18f99b6c1b8885c638f59b74dac6 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 23:55:30 +0300 Subject: [PATCH 25/34] add extra simplify-global-optimizig --- cli/asc.js | 1 + tests/compiler/comma.optimized.wat | 15 ++--------- .../resolve-elementaccess.optimized.wat | 7 ++--- tests/compiler/unary.optimized.wat | 26 ++++++------------- 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 04deb0dbd3..78fafd23b2 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -775,6 +775,7 @@ exports.main = function main(argv, options, callback) { // } if (optimizeLevel >= 3) { add("optimize-instructions"); + add("simplify-globals-optimizing"); } if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("rse"); diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 480377295e..212f05ac19 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -76,21 +76,10 @@ global.set $comma/b i32.const 2 global.set $comma/a - global.get $comma/a + i32.const 2 global.set $comma/b - global.get $comma/b - global.set $comma/a - global.get $comma/a i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1040 - i32.const 18 - i32.const 1 - call $~lib/builtins/abort - unreachable - end + global.set $comma/a global.get $comma/b i32.const 2 i32.ne diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index fbf5477830..c42f7a7633 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -2001,13 +2001,14 @@ i32.const 7 call $~lib/rt/stub/__alloc local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 12 i32.const 8 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/buf diff --git a/tests/compiler/unary.optimized.wat b/tests/compiler/unary.optimized.wat index 9de50e4322..495e5af382 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -44,9 +44,7 @@ global.set $unary/i i32.const 0 global.set $unary/i - global.get $unary/i - i32.const 1 - i32.sub + i32.const -1 global.set $unary/i global.get $unary/i local.tee $0 @@ -94,9 +92,7 @@ global.set $unary/I i64.const 0 global.set $unary/I - global.get $unary/I - i64.const 1 - i64.sub + i64.const -1 global.set $unary/I global.get $unary/I local.tee $1 @@ -144,14 +140,11 @@ global.set $unary/f f32.const 1.25 global.set $unary/f - f32.const 1.25 - local.tee $2 - f32.const 1 - f32.add + f32.const 2.25 global.set $unary/f - local.get $2 + f32.const 1.25 global.set $unary/f - global.get $unary/f + f32.const 1.25 local.tee $2 f32.const 1 f32.sub @@ -190,14 +183,11 @@ global.set $unary/F f64.const 1.25 global.set $unary/F - f64.const 1.25 - local.tee $3 - f64.const 1 - f64.add + f64.const 2.25 global.set $unary/F - local.get $3 + f64.const 1.25 global.set $unary/F - global.get $unary/F + f64.const 1.25 local.tee $3 f64.const 1 f64.sub From 4703c431925cd739775abd621e5d543ae1963445 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 18 Apr 2020 23:59:23 +0300 Subject: [PATCH 26/34] move it below --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 78fafd23b2..3e09e7d2cd 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -775,7 +775,6 @@ exports.main = function main(argv, options, callback) { // } if (optimizeLevel >= 3) { add("optimize-instructions"); - add("simplify-globals-optimizing"); } if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("rse"); @@ -783,6 +782,7 @@ exports.main = function main(argv, options, callback) { add("vacuum"); // PassRunner::addDefaultGlobalOptimizationPostPasses if (optimizeLevel >= 2 || shrinkLevel >= 1) { + add("simplify-globals-optimizing"); // differs add("dae-optimizing"); } if (optimizeLevel >= 2 || shrinkLevel >= 2) { From 1af1dd8e2a884829209c33bd46c92af32ed5a655 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 19 Apr 2020 08:04:02 +0300 Subject: [PATCH 27/34] add early remove-unused-module-elements --- cli/asc.js | 1 + tests/compiler/extends-recursive.optimized.wat | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 3e09e7d2cd..93a4538a6b 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -694,6 +694,7 @@ exports.main = function main(argv, options, callback) { // PassRunner::addDefaultGlobalOptimizationPrePasses add("duplicate-function-elimination"); + add("remove-unused-module-elements"); // differs // PassRunner::addDefaultFunctionOptimizationPasses if (optimizeLevel >= 3 || shrinkLevel >= 1) { diff --git a/tests/compiler/extends-recursive.optimized.wat b/tests/compiler/extends-recursive.optimized.wat index fc1bb29552..eaf97cd657 100644 --- a/tests/compiler/extends-recursive.optimized.wat +++ b/tests/compiler/extends-recursive.optimized.wat @@ -1,15 +1,12 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) - (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $extends-recursive/Child i32 (i32.const 3)) (export "memory" (memory $0)) (export "Child" (global $extends-recursive/Child)) (export "Child#get:child" (func $extends-recursive/Parent#get:child)) (export "Child#set:child" (func $extends-recursive/Parent#set:child)) - (start $~start) (func $extends-recursive/Parent#get:child (param $0 i32) (result i32) local.get $0 i32.load @@ -22,8 +19,4 @@ local.get $1 i32.store ) - (func $~start - i32.const 1024 - global.set $~lib/rt/stub/offset - ) ) From 5370096728cef78de0cfab43875751db595ea99f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 19 Apr 2020 14:20:52 +0300 Subject: [PATCH 28/34] add vacuum after simplify-locals-nostructure --- cli/asc.js | 1 + tests/compiler/std/array.optimized.wat | 2107 ++++++++++++------------ 2 files changed, 1086 insertions(+), 1022 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 93a4538a6b..525c071a77 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -840,6 +840,7 @@ exports.main = function main(argv, options, callback) { add("merge-locals"); add("coalesce-locals"); add("simplify-locals-nostructure"); + add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); add("vacuum"); diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index efc18ede9c..e81a55fa75 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4325,81 +4325,6 @@ i32.add f64.load ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - loop $for-loop|0 - local.get $7 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $7 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $4 - loop $while-continue|1 - local.get $4 - i32.const 0 - i32.ge_s - if - local.get $6 - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $5 - local.get $2 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $4 - local.tee $3 - i32.const 1 - i32.sub - local.set $4 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $4 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -4657,6 +4582,10 @@ (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=12 local.tee $3 @@ -4669,26 +4598,26 @@ end local.get $0 i32.load offset=4 - local.set $4 + local.set $2 local.get $3 i32.const 2 i32.eq if - local.get $4 + local.get $2 i32.load offset=4 local.tee $3 - local.get $4 + local.get $2 i32.load - local.tee $2 + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $4 local.get $2 + local.get $5 i32.store offset=4 - local.get $4 + local.get $2 local.get $3 i32.store end @@ -4697,17 +4626,84 @@ return end local.get $3 - local.tee $2 i32.const 256 i32.lt_s if - local.get $4 - local.get $2 + local.get $3 + local.set $5 local.get $1 - call $~lib/util/sort/insertionSort + local.set $7 + loop $for-loop|0 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $4 + i32.const 1 + i32.sub + local.set $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + local.get $7 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.tee $3 + i32.const 1 + i32.sub + local.set $1 + local.get $2 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + br $while-continue|1 + end + end + end + local.get $2 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end else - local.get $4 local.get $2 + local.get $3 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -5030,9 +5026,13 @@ (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=12 - local.tee $2 + local.tee $5 i32.const 1 i32.le_s if @@ -5042,37 +5042,105 @@ end local.get $0 i32.load offset=4 - local.set $3 - local.get $2 + local.set $2 + local.get $5 i32.const 2 i32.eq if - local.get $3 + local.get $2 i32.load offset=4 - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 i32.load - local.tee $4 + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $3 - local.get $4 + local.get $2 + local.get $5 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 $3 local.get $2 + local.set $3 local.get $1 - call $~lib/util/sort/insertionSort + local.set $7 + loop $for-loop|0 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $3 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $4 + i32.const 1 + i32.sub + local.set $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + local.get $7 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.tee $2 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + br $while-continue|1 + end + end + end + local.get $3 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end local.get $0 call $~lib/rt/pure/__retain ) @@ -5466,81 +5534,7 @@ local.get $1 end ) - (func $std/array/createRandomString (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 6064 - local.set $1 - loop $for-loop|0 - local.get $4 - local.get $0 - i32.lt_s - if - local.get $1 - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 6064 - call $~lib/math/NativeMath.random - i32.const 5088 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $3 - i32.const 5088 - 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 $3 - i32.const 1 - i32.shl - i32.const 5088 - i32.add - i32.load16_u - i32.store16 - local.get $2 - call $~lib/rt/pure/__retain - end - local.tee $6 - call $~lib/string/String.__concat - local.tee $5 - local.set $2 - local.get $5 - local.get $1 - local.tee $3 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $2 - local.set $1 - local.get $6 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $1 - ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9538,13 +9532,13 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f32) (local $12 i32) (local $13 i32) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) + (local $17 f64) (local $18 i32) (local $19 i32) (local $20 i32) @@ -9555,26 +9549,26 @@ (local $25 i32) (local $26 i32) (local $27 i32) - (local $28 f64) - (local $29 f32) + (local $28 i32) + (local $29 i32) (local $30 i32) (local $31 i32) (local $32 i32) (local $33 i32) - (local $34 i32) - (local $35 i32) + (local $34 f32) + (local $35 f64) (local $36 i32) (local $37 i32) (local $38 i32) (local $39 i32) (local $40 i32) (local $41 i32) - (local $42 f64) + (local $42 i32) (local $43 i32) (local $44 i32) (local $45 i32) (local $46 i32) - (local $47 f32) + (local $47 i32) (local $48 i32) (local $49 i32) (local $50 i32) @@ -9598,52 +9592,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $60 + local.set $1 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $60 + local.get $1 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $60 + local.set $1 end - local.get $60 + local.get $1 i32.const 0 i32.store - local.get $60 + local.get $1 i32.const 0 i32.store offset=4 - local.get $60 + local.get $1 i32.const 0 i32.store offset=8 - local.get $1 + local.get $2 local.tee $0 - local.get $60 + local.get $1 i32.load - local.tee $59 + local.tee $3 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $59 + local.get $3 call $~lib/rt/pure/__release end - local.get $60 + local.get $1 local.get $0 i32.store - local.get $60 local.get $1 + local.get $2 i32.store offset=4 - local.get $60 + local.get $1 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9657,7 +9651,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $60 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9665,20 +9659,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -9689,20 +9683,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -9713,20 +9707,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -9737,20 +9731,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -9761,20 +9755,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $9 call $std/array/isArraysEqual i32.eqz if @@ -9785,17 +9779,17 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $2 call $~lib/rt/pure/__release - local.get $61 + local.get $1 call $~lib/rt/pure/__release - local.get $59 + local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $9 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9803,20 +9797,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9828,20 +9822,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9853,20 +9847,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9878,20 +9872,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9903,20 +9897,20 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $57 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9928,17 +9922,17 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $2 call $~lib/rt/pure/__release - local.get $61 + local.get $1 call $~lib/rt/pure/__release - local.get $59 + local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $9 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10201,37 +10195,37 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $2 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 local.get $0 i32.load offset=12 - local.tee $1 + local.tee $2 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 - local.tee $60 - local.get $1 + local.tee $1 + local.get $2 i32.const 2 i32.shl i32.add - local.set $1 + local.set $2 loop $do-continue|0 - local.get $60 + local.get $1 i32.load call $~lib/rt/pure/__release - local.get $60 + local.get $1 i32.const 4 i32.add - local.tee $60 - local.get $1 + local.tee $1 + local.get $2 i32.lt_u br_if $do-continue|0 end @@ -10257,11 +10251,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $61 + local.set $2 global.get $std/array/arr - local.get $61 + local.get $2 call $~lib/array/Array#concat - local.set $0 + local.set $1 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10286,7 +10280,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -10298,14 +10292,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10320,7 +10314,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10333,7 +10327,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10346,7 +10340,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10359,17 +10353,17 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $2 i32.const 46 call $~lib/array/Array#push - local.get $61 + local.get $2 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $61 + local.get $2 call $~lib/array/Array#concat - local.set $58 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10383,7 +10377,7 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $2 i32.load offset=12 i32.const 2 i32.ne @@ -10395,7 +10389,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.load offset=12 i32.const 5 i32.ne @@ -10407,7 +10401,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10420,7 +10414,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10433,7 +10427,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10446,7 +10440,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10459,7 +10453,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10472,10 +10466,10 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 call $~lib/array/Array#pop drop - local.get $58 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -10493,7 +10487,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -10503,13 +10497,13 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 global.get $std/array/arr call $~lib/array/Array#concat - local.set $0 - local.get $58 - call $~lib/rt/pure/__release + local.set $4 local.get $0 + call $~lib/rt/pure/__release + local.get $4 i32.load offset=12 i32.const 3 i32.ne @@ -10521,7 +10515,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.load offset=12 if i32.const 0 @@ -10531,13 +10525,13 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $59 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10545,19 +10539,19 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $38 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10576,21 +10570,21 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $36 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10608,22 +10602,22 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $55 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10641,21 +10635,21 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $52 + local.tee $25 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10673,21 +10667,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $53 + local.tee $8 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10705,21 +10699,21 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $49 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10737,21 +10731,21 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $46 + local.tee $30 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10769,21 +10763,21 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $44 + local.tee $19 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10801,21 +10795,21 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $60 + local.tee $14 i32.const 5 i32.const 2 i32.const 3 i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10833,21 +10827,22 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $57 + local.tee $22 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10865,22 +10860,22 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $2 local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $61 + local.tee $24 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10898,22 +10893,22 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $40 - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.get $40 + local.get $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10925,55 +10920,55 @@ call $~lib/builtins/abort unreachable end - local.get $40 + local.get $0 call $~lib/rt/pure/__release - local.get $38 + local.get $1 call $~lib/rt/pure/__release - local.get $37 + local.get $4 call $~lib/rt/pure/__release - local.get $36 + local.get $3 call $~lib/rt/pure/__release - local.get $35 + local.get $9 call $~lib/rt/pure/__release - local.get $55 + local.get $15 call $~lib/rt/pure/__release - local.get $54 + local.get $7 call $~lib/rt/pure/__release - local.get $52 + local.get $25 call $~lib/rt/pure/__release - local.get $51 + local.get $6 call $~lib/rt/pure/__release - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $50 + local.get $10 call $~lib/rt/pure/__release - local.get $49 + local.get $13 call $~lib/rt/pure/__release - local.get $48 + local.get $16 call $~lib/rt/pure/__release - local.get $46 + local.get $30 call $~lib/rt/pure/__release - local.get $45 + local.get $18 call $~lib/rt/pure/__release - local.get $44 + local.get $19 call $~lib/rt/pure/__release - local.get $43 + local.get $20 call $~lib/rt/pure/__release - local.get $60 + local.get $14 call $~lib/rt/pure/__release - local.get $56 + local.get $21 call $~lib/rt/pure/__release - local.get $57 + local.get $22 call $~lib/rt/pure/__release - local.get $58 + local.get $23 call $~lib/rt/pure/__release - local.get $61 + local.get $24 call $~lib/rt/pure/__release - local.get $59 + local.get $26 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $27 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -11147,7 +11142,7 @@ unreachable end global.get $std/array/arr - local.tee $61 + local.tee $2 i32.load offset=12 local.tee $1 i32.const 1 @@ -11160,29 +11155,29 @@ call $~lib/builtins/abort unreachable end - local.get $61 + local.get $2 i32.load offset=4 - local.tee $58 + local.tee $0 i32.load - local.get $58 - local.get $58 + local.get $0 + local.get $0 i32.const 4 i32.add local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 i32.const 2 i32.shl - local.tee $1 + local.tee $3 call $~lib/memory/memory.copy - local.get $1 - local.get $58 + local.get $0 + local.get $3 i32.add i32.const 0 i32.store - local.get $61 - local.get $0 + local.get $2 + local.get $1 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11350,14 +11345,14 @@ unreachable end global.get $std/array/arr - local.tee $59 + local.tee $2 i32.load offset=12 local.tee $1 if - local.get $59 + local.get $2 i32.load offset=4 local.set $0 - local.get $59 + local.get $2 i32.load offset=4 local.get $1 i32.const 1 @@ -11365,30 +11360,30 @@ i32.const 2 i32.shl i32.add - local.set $60 + local.set $1 loop $while-continue|0 local.get $0 - local.get $60 + local.get $1 i32.lt_u if local.get $0 i32.load - local.set $1 + local.set $2 local.get $0 - local.get $60 + local.get $1 i32.load i32.store - local.get $60 local.get $1 + local.get $2 i32.store local.get $0 i32.const 4 i32.add local.set $0 - local.get $60 + local.get $1 i32.const 4 i32.sub - local.set $60 + local.set $1 br $while-continue|0 end end @@ -11626,17 +11621,17 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 - local.set $1 + local.tee $2 + local.set $3 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $57 + local.get $2 i32.load offset=12 - local.tee $61 + local.tee $1 if (result i32) i32.const 0 - local.get $61 + local.get $1 i32.ge_s else i32.const 1 @@ -11646,15 +11641,15 @@ local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $1 + local.get $3 i32.load offset=4 - local.set $1 + local.set $4 loop $while-continue|022 local.get $0 - local.get $61 + local.get $1 i32.lt_s if - local.get $1 + local.get $4 local.get $0 i32.const 2 i32.shl @@ -11690,17 +11685,17 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 - local.set $1 + local.tee $1 + local.set $9 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $58 + local.get $1 i32.load offset=12 - local.tee $61 + local.tee $4 if (result i32) i32.const 0 - local.get $61 + local.get $4 i32.ge_s else i32.const 1 @@ -11710,15 +11705,15 @@ local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $1 + local.get $9 i32.load offset=4 - local.set $1 + local.set $3 loop $while-continue|023 local.get $0 - local.get $61 + local.get $4 i32.lt_s if - local.get $1 + local.get $3 local.get $0 i32.const 3 i32.shl @@ -11748,9 +11743,9 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $2 call $~lib/rt/pure/__release - local.get $58 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11898,41 +11893,41 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $4 i32.load offset=12 - local.tee $61 + local.tee $1 if (result i32) i32.const 0 - local.get $61 + local.get $1 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $58 + local.get $4 i32.load offset=4 - local.set $1 + local.set $9 loop $while-continue|024 local.get $0 - local.get $61 + local.get $1 i32.lt_s if i32.const 1 - local.get $1 + local.get $9 local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $47 + local.tee $11 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $47 - local.get $47 + local.get $11 + local.get $11 f32.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -11957,7 +11952,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $60 + local.set $1 i32.const 0 i32.const 1 i32.const 3 @@ -11965,49 +11960,49 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $2 i32.load offset=12 - local.tee $59 + local.tee $3 if (result i32) i32.const 0 - local.get $59 + local.get $3 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $61 + local.get $2 i32.load offset=4 - local.set $1 + local.set $15 loop $while-continue|025 - local.get $60 - local.get $59 + local.get $1 + local.get $3 i32.lt_s if i32.const 1 + local.get $15 local.get $1 - local.get $60 i32.const 3 i32.shl i32.add f64.load - local.tee $42 + local.tee $17 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $42 - local.get $42 + local.get $17 + local.get $17 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $while-continue|025 end end @@ -12077,9 +12072,9 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $4 call $~lib/rt/pure/__release - local.get $61 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12087,18 +12082,18 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $23 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12110,14 +12105,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12136,20 +12131,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $0 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $20 + local.tee $6 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12168,7 +12163,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12186,14 +12181,14 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $17 + local.tee $13 i32.const 3 i32.const 2 i32.const 3 @@ -12212,14 +12207,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12237,21 +12232,21 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 + local.set $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $14 + local.tee $19 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12263,14 +12258,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12288,20 +12283,21 @@ i32.const 3792 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 0 i32.const 1 call $~lib/array/Array#splice - local.tee $11 + local.tee $21 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12320,7 +12316,7 @@ i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12344,14 +12340,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $8 + local.tee $24 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12370,7 +12366,7 @@ i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12394,14 +12390,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $5 + local.tee $31 i32.const 2 i32.const 2 i32.const 3 i32.const 4064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $32 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12420,7 +12416,7 @@ i32.const 4096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12444,14 +12440,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $2 + local.tee $28 i32.const 1 i32.const 2 i32.const 3 i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $29 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12470,7 +12466,7 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12494,7 +12490,7 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $40 + local.tee $37 i32.const 1 i32.const 2 i32.const 3 @@ -12520,7 +12516,7 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12544,14 +12540,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $36 + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12570,7 +12566,7 @@ i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12594,14 +12590,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $54 + local.tee $43 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12620,7 +12616,7 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12638,21 +12634,21 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $53 + local.tee $46 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12664,14 +12660,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 3 i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12690,20 +12686,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $0 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $48 + local.tee $49 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12722,7 +12718,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12740,21 +12736,21 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $27 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $27 + local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $44 + local.tee $52 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12766,14 +12762,14 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $2 i32.const 5 i32.const 2 i32.const 3 i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12791,10 +12787,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $1 + local.tee $15 i32.load offset=12 if i32.const 0 @@ -12804,7 +12800,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=12 if i32.const 0 @@ -12820,37 +12816,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $9 i32.load offset=4 - local.tee $59 + local.tee $0 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $59 + local.get $0 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $59 + local.get $0 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $59 + local.get $0 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $59 + local.get $0 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $34 + local.get $9 i32.const 2 call $~lib/array/Array#splice - local.set $30 - local.get $1 + local.set $25 + local.get $15 call $~lib/rt/pure/__release - local.get $30 + local.get $25 i32.load offset=12 i32.const 2 i32.ne @@ -12862,10 +12858,10 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $25 i32.const 0 call $~lib/array/Array#__get - local.tee $56 + local.tee $55 i32.load i32.const 3 i32.ne @@ -12877,10 +12873,10 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $25 i32.const 1 call $~lib/array/Array#__get - local.tee $57 + local.tee $56 i32.load i32.const 4 i32.ne @@ -12892,7 +12888,7 @@ call $~lib/builtins/abort unreachable end - local.get $34 + local.get $9 i32.load offset=12 i32.const 3 i32.ne @@ -12904,10 +12900,10 @@ call $~lib/builtins/abort unreachable end - local.get $34 + local.get $9 i32.const 0 call $~lib/array/Array#__get - local.tee $58 + local.tee $57 i32.load i32.const 1 i32.ne @@ -12919,10 +12915,10 @@ call $~lib/builtins/abort unreachable end - local.get $34 + local.get $9 i32.const 1 call $~lib/array/Array#__get - local.tee $61 + local.tee $58 i32.load i32.const 2 i32.ne @@ -12934,7 +12930,7 @@ call $~lib/builtins/abort unreachable end - local.get $34 + local.get $9 i32.const 2 call $~lib/array/Array#__get local.tee $59 @@ -12955,22 +12951,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $15 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $0 i32.const 0 i32.store offset=4 - local.get $1 + local.get $0 i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $31 + local.get $15 call $~lib/array/Array#splice - local.tee $26 + local.tee $30 i32.load offset=12 i32.const 1 i32.ne @@ -12982,11 +12978,11 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $30 i32.const 0 call $~lib/array/Array#__get - local.tee $25 - local.get $25 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -13007,7 +13003,7 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $15 i32.load offset=12 i32.const 2 i32.ne @@ -13019,10 +13015,10 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $15 i32.const 0 call $~lib/array/Array#__get - local.tee $0 + local.tee $60 if i32.const 0 i32.const 1296 @@ -13031,11 +13027,11 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $15 i32.const 1 call $~lib/array/Array#__get - local.tee $24 - local.get $24 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -13056,91 +13052,93 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $2 call $~lib/rt/pure/__release - local.get $23 + local.get $4 call $~lib/rt/pure/__release - local.get $22 + local.get $3 call $~lib/rt/pure/__release - local.get $21 + local.get $7 call $~lib/rt/pure/__release - local.get $20 + local.get $6 call $~lib/rt/pure/__release - local.get $19 + local.get $8 call $~lib/rt/pure/__release - local.get $18 + local.get $10 call $~lib/rt/pure/__release - local.get $17 + local.get $13 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $15 + local.get $18 call $~lib/rt/pure/__release - local.get $14 + local.get $19 call $~lib/rt/pure/__release - local.get $13 + local.get $20 call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $11 + local.get $21 call $~lib/rt/pure/__release - local.get $10 + local.get $22 call $~lib/rt/pure/__release - local.get $9 + local.get $23 call $~lib/rt/pure/__release - local.get $8 + local.get $24 call $~lib/rt/pure/__release - local.get $7 + local.get $26 call $~lib/rt/pure/__release - local.get $6 + local.get $27 call $~lib/rt/pure/__release - local.get $5 + local.get $31 call $~lib/rt/pure/__release - local.get $4 + local.get $32 call $~lib/rt/pure/__release - local.get $3 + local.get $33 call $~lib/rt/pure/__release - local.get $2 + local.get $28 call $~lib/rt/pure/__release - local.get $33 + local.get $29 call $~lib/rt/pure/__release - local.get $32 + local.get $36 call $~lib/rt/pure/__release - local.get $40 + local.get $37 call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release - local.get $37 + local.get $39 call $~lib/rt/pure/__release - local.get $36 + local.get $40 call $~lib/rt/pure/__release - local.get $35 + local.get $41 call $~lib/rt/pure/__release - local.get $55 + local.get $42 call $~lib/rt/pure/__release - local.get $54 + local.get $43 call $~lib/rt/pure/__release - local.get $52 + local.get $44 call $~lib/rt/pure/__release - local.get $51 + local.get $45 call $~lib/rt/pure/__release - local.get $53 + local.get $46 call $~lib/rt/pure/__release - local.get $50 + 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 $48 + local.get $50 call $~lib/rt/pure/__release - local.get $46 + local.get $51 call $~lib/rt/pure/__release - local.get $45 + local.get $52 call $~lib/rt/pure/__release - local.get $44 + local.get $53 call $~lib/rt/pure/__release - local.get $43 + local.get $54 call $~lib/rt/pure/__release - local.get $60 + local.get $55 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release @@ -13148,15 +13146,13 @@ call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release - local.get $61 - call $~lib/rt/pure/__release local.get $59 call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $24 + local.get $60 + call $~lib/rt/pure/__release + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -13630,17 +13626,17 @@ unreachable end loop $for-loop|0 - local.get $39 + local.get $5 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $39 + local.get $5 i32.const 1 i32.add - local.set $39 + local.set $5 br $for-loop|0 end end @@ -13657,54 +13653,54 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $60 + local.set $1 global.get $std/array/arr - local.tee $61 + local.tee $2 i32.load offset=12 - local.tee $59 + local.tee $5 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $0 i32.load offset=4 - local.set $0 + local.set $4 loop $for-loop|043 - local.get $60 - local.get $59 - local.get $61 - i32.load offset=12 - local.tee $1 - local.get $59 local.get $1 + local.get $5 + local.get $2 + i32.load offset=12 + local.tee $3 + local.get $5 + local.get $3 i32.lt_s select i32.lt_s if - local.get $60 + local.get $1 i32.const 2 i32.shl - local.tee $1 - local.get $61 + local.tee $3 + local.get $2 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $47 - local.get $0 - local.get $1 + local.set $11 + local.get $3 + local.get $4 i32.add - local.get $47 + local.get $11 f32.store - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $for-loop|043 end end - local.get $58 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -13716,7 +13712,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13825,12 +13821,12 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $58 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 call $~lib/array/Array#filter - local.tee $1 + local.tee $0 i32.load offset=12 i32.const 2 i32.ne @@ -13935,7 +13931,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 30 @@ -14251,63 +14247,63 @@ i32.const 5280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $4 i32.load offset=12 - local.tee $59 + local.tee $3 i32.const 1 i32.le_s if - local.get $55 + local.get $4 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $55 + local.get $4 i32.load offset=4 - local.set $61 - local.get $59 + local.set $1 + local.get $3 i32.const 2 i32.eq if - local.get $61 + local.get $1 f32.load offset=4 - local.tee $29 - local.get $61 + local.tee $11 + local.get $1 f32.load - local.tee $47 + local.tee $34 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $61 - local.get $47 + local.get $1 + local.get $34 f32.store offset=4 - local.get $61 - local.get $29 + local.get $1 + local.get $11 f32.store end - local.get $55 + local.get $4 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $59 + local.get $3 i32.const 256 i32.lt_s if i32.const 0 - local.set $58 + local.set $5 loop $for-loop|00 - local.get $58 - local.get $59 + local.get $5 + local.get $3 i32.lt_s if - local.get $61 - local.get $58 + local.get $1 + local.get $5 i32.const 2 i32.shl i32.add f32.load - local.set $29 - local.get $58 + local.set $11 + local.get $5 i32.const 1 i32.sub local.set $0 @@ -14316,58 +14312,58 @@ i32.const 0 i32.ge_s if - local.get $29 - local.get $61 + local.get $11 + local.get $1 local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $47 + local.tee $34 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if local.get $0 - local.tee $1 + local.tee $2 i32.const 1 i32.sub local.set $0 - local.get $61 local.get $1 + local.get $2 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $47 + local.get $34 f32.store br $while-continue|1 end end end - local.get $61 + local.get $1 local.get $0 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $29 + local.get $11 f32.store - local.get $58 + local.get $5 i32.const 1 i32.add - local.set $58 + local.set $5 br $for-loop|00 end end else - local.get $61 - local.get $59 + local.get $1 + local.get $3 call $~lib/util/sort/weakHeapSort end - local.get $55 + local.get $4 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14378,59 +14374,59 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $51 + local.set $7 i32.const 0 - local.set $60 + local.set $1 block $folding-inner0 - local.get $55 + local.get $4 i32.load offset=12 - local.tee $1 - local.get $51 + local.tee $2 + local.get $7 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $51 - local.get $55 + local.get $4 + local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|001 - local.get $60 local.get $1 + local.get $2 i32.lt_s if - local.get $55 - local.get $60 + local.get $4 + local.get $1 call $~lib/array/Array#__get - local.tee $47 - local.get $47 + local.tee $11 + local.get $11 f32.ne if (result i32) - local.get $51 - local.get $60 + local.get $7 + local.get $1 call $~lib/array/Array#__get - local.tee $47 - local.get $47 + local.tee $11 + local.get $11 f32.ne else i32.const 0 end i32.eqz if - local.get $55 - local.get $60 + local.get $4 + local.get $1 call $~lib/array/Array#__get - local.get $51 - local.get $60 + local.get $7 + local.get $1 call $~lib/array/Array#__get f32.ne br_if $folding-inner0 end - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $for-loop|001 end end @@ -14455,63 +14451,63 @@ i32.const 5376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $3 i32.load offset=12 - local.tee $59 + local.tee $6 i32.const 1 i32.le_s if - local.get $54 + local.get $3 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $54 + local.get $3 i32.load offset=4 - local.set $61 - local.get $59 + local.set $1 + local.get $6 i32.const 2 i32.eq if - local.get $61 + local.get $1 f64.load offset=8 - local.tee $28 - local.get $61 + local.tee $17 + local.get $1 f64.load - local.tee $42 + local.tee $35 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $61 - local.get $42 + local.get $1 + local.get $35 f64.store offset=8 - local.get $61 - local.get $28 + local.get $1 + local.get $17 f64.store end - local.get $54 + local.get $3 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $59 + local.get $6 i32.const 256 i32.lt_s if i32.const 0 - local.set $58 + local.set $5 loop $for-loop|02 - local.get $58 - local.get $59 + local.get $5 + local.get $6 i32.lt_s if - local.get $61 - local.get $58 + local.get $1 + local.get $5 i32.const 3 i32.shl i32.add f64.load - local.set $28 - local.get $58 + local.set $17 + local.get $5 i32.const 1 i32.sub local.set $0 @@ -14520,58 +14516,58 @@ i32.const 0 i32.ge_s if - local.get $28 - local.get $61 + local.get $17 + local.get $1 local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $42 + local.tee $35 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if local.get $0 - local.tee $1 + local.tee $2 i32.const 1 i32.sub local.set $0 - local.get $61 local.get $1 + local.get $2 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $42 + local.get $35 f64.store br $while-continue|13 end end end - local.get $61 + local.get $1 local.get $0 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $28 + local.get $17 f64.store - local.get $58 + local.get $5 i32.const 1 i32.add - local.set $58 + local.set $5 br $for-loop|02 end end else - local.get $61 - local.get $59 + local.get $1 + local.get $6 call $~lib/util/sort/weakHeapSort end - local.get $54 + local.get $3 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release @@ -14582,59 +14578,59 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $2 i32.const 0 - local.set $60 + local.set $1 block $folding-inner01 - local.get $54 + local.get $3 i32.load offset=12 - local.tee $1 - local.get $53 + local.tee $5 + local.get $2 i32.load offset=12 i32.ne br_if $folding-inner01 i32.const 1 - local.get $53 - local.get $54 + local.get $2 + local.get $3 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|025 - local.get $60 local.get $1 + local.get $5 i32.lt_s if - local.get $54 - local.get $60 + local.get $3 + local.get $1 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $17 + local.get $17 f64.ne if (result i32) - local.get $53 - local.get $60 + local.get $2 + local.get $1 call $~lib/array/Array#__get - local.tee $42 - local.get $42 + local.tee $17 + local.get $17 f64.ne else i32.const 0 end i32.eqz if - local.get $54 - local.get $60 + local.get $3 + local.get $1 call $~lib/array/Array#__get - local.get $53 - local.get $60 + local.get $2 + local.get $1 call $~lib/array/Array#__get f64.ne br_if $folding-inner01 end - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $for-loop|025 end end @@ -14658,18 +14654,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $18 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $60 + local.get $18 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14687,18 +14683,18 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $19 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $56 + local.get $19 i32.const 5 i32.const 2 i32.const 7 i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14716,64 +14712,64 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $20 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $50 + local.set $5 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $49 + local.set $1 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $48 + local.set $6 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 + local.set $0 i32.const 64 call $std/array/createReverseOrderedArray - local.set $46 + local.set $8 i32.const 128 call $std/array/createReverseOrderedArray - local.set $45 + local.set $10 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $44 + local.set $13 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $43 + local.set $16 i32.const 512 call $std/array/createRandomOrderedArray - local.set $58 - local.get $57 + local.set $14 + local.get $20 i32.const 48 call $std/array/assertSorted - local.get $50 + local.get $5 i32.const 48 call $std/array/assertSorted - local.get $50 + local.get $5 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14785,17 +14781,17 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $1 i32.const 48 call $std/array/assertSorted - local.get $49 + local.get $1 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14807,11 +14803,11 @@ call $~lib/builtins/abort unreachable end - local.get $48 + local.get $6 i32.const 48 call $std/array/assertSorted - local.get $48 - local.get $52 + local.get $6 + local.get $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14823,11 +14819,11 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $8 i32.const 48 call $std/array/assertSorted - local.get $46 - local.get $52 + local.get $8 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14839,11 +14835,11 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $45 - local.get $52 + local.get $10 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14855,11 +14851,11 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $44 - local.get $52 + local.get $13 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14871,11 +14867,11 @@ call $~lib/builtins/abort unreachable end - local.get $43 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $43 - local.get $52 + local.get $16 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14887,82 +14883,82 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $55 + local.get $4 call $~lib/rt/pure/__release - local.get $51 + local.get $7 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $53 + local.get $2 call $~lib/rt/pure/__release - local.get $60 + local.get $18 call $~lib/rt/pure/__release - local.get $61 + local.get $21 call $~lib/rt/pure/__release - local.get $56 + local.get $19 call $~lib/rt/pure/__release - local.get $59 + local.get $22 call $~lib/rt/pure/__release - local.get $57 + local.get $20 call $~lib/rt/pure/__release - local.get $50 + local.get $5 call $~lib/rt/pure/__release - local.get $49 + local.get $1 call $~lib/rt/pure/__release - local.get $48 + local.get $6 call $~lib/rt/pure/__release - local.get $52 + local.get $0 call $~lib/rt/pure/__release - local.get $46 + local.get $8 call $~lib/rt/pure/__release - local.get $45 + local.get $10 call $~lib/rt/pure/__release - local.get $44 + local.get $13 call $~lib/rt/pure/__release - local.get $43 + local.get $16 call $~lib/rt/pure/__release - local.get $58 + local.get $14 call $~lib/rt/pure/__release - local.get $0 + local.get $23 call $~lib/rt/pure/__release - local.get $1 + local.get $24 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $1 + local.set $2 local.get $0 i32.const 49 call $std/array/assertSorted local.get $0 i32.const 50 call $std/array/assertSorted - local.get $1 + local.get $2 i32.const 51 call $std/array/assertSorted - local.get $1 + local.get $2 i32.const 52 call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release call $std/array/createReverseOrderedNestedArray - local.tee $1 + 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 $1 + local.tee $0 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14970,59 +14966,59 @@ i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $56 + local.set $3 i32.const 7 i32.const 2 i32.const 15 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + local.set $7 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $60 - local.get $56 + local.set $1 + local.get $3 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $58 - local.set $61 - local.get $58 + local.tee $0 + local.set $2 + local.get $0 i32.load offset=12 - local.set $1 + local.set $6 loop $for-loop|03 - local.get $60 local.get $1 + local.get $6 i32.lt_s if - local.get $61 - local.get $60 + local.get $2 + local.get $1 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $59 - local.get $61 - local.get $60 + local.tee $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get - local.tee $0 + local.tee $4 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $59 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> end - local.get $59 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release - local.get $60 + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $for-loop|03 end end @@ -15037,57 +15033,57 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $0 call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $60 + local.set $1 i32.const 0 - local.get $56 + local.get $3 i32.load offset=12 - local.tee $1 - local.get $57 + local.tee $5 + local.get $7 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $56 - local.get $57 + local.get $3 + local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 - local.get $60 local.get $1 + local.get $5 i32.lt_s if - local.get $56 - local.get $60 - call $~lib/array/Array#__get - local.tee $59 - local.get $57 - local.get $60 + local.get $3 + local.get $1 call $~lib/array/Array#__get local.tee $0 + local.get $7 + local.get $1 + call $~lib/array/Array#__get + local.tee $2 call $~lib/string/String.__eq i32.eqz if - local.get $59 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $59 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $60 + local.get $2 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 i32.add - local.set $60 + local.set $1 br $for-loop|04 end end @@ -15103,7 +15099,7 @@ unreachable end i32.const 0 - local.set $39 + local.set $5 i32.const 1600 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -15115,75 +15111,142 @@ i32.const 16 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $61 + local.tee $2 i32.const 0 i32.store - local.get $61 + local.get $2 i32.const 0 i32.store offset=4 - local.get $61 + local.get $2 i32.const 0 i32.store offset=8 - local.get $61 + local.get $2 i32.const 0 i32.store offset=12 local.get $0 local.set $1 local.get $0 - local.get $61 + local.get $2 i32.load - local.tee $59 + local.tee $4 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $59 + local.get $4 call $~lib/rt/pure/__release end - local.get $61 + local.get $2 local.get $1 i32.store - local.get $61 + local.get $2 local.get $0 i32.store offset=4 - local.get $61 + local.get $2 i32.const 1600 i32.store offset=8 - local.get $61 + local.get $2 i32.const 400 i32.store offset=12 loop $for-loop|09 - local.get $39 + local.get $5 i32.const 400 i32.lt_s if - local.get $61 - local.get $39 + local.get $5 + local.set $1 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 $39 - i32.const 1 - i32.add - local.set $39 - br $for-loop|09 + local.set $8 + i32.const 0 + local.set $6 + i32.const 6064 + local.set $0 + loop $for-loop|01 + local.get $6 + local.get $8 + i32.lt_s + if + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 6064 + call $~lib/math/NativeMath.random + i32.const 5088 + call $~lib/string/String#get:length + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $5 + i32.const 5088 + 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 $5 + i32.const 1 + i32.shl + i32.const 5088 + i32.add + i32.load16_u + i32.store16 + local.get $4 + call $~lib/rt/pure/__retain + end + local.set $5 + local.get $0 + local.tee $4 + local.get $0 + local.get $5 + call $~lib/string/String.__concat + local.tee $10 + local.tee $0 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $5 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end + local.get $2 + local.get $1 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $5 + br $for-loop|09 end end - local.get $61 + local.get $2 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $56 + local.get $3 call $~lib/rt/pure/__release - local.get $57 + local.get $7 call $~lib/rt/pure/__release - local.get $61 + local.get $2 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15191,12 +15254,12 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $0 i32.load offset=4 - local.get $53 + local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $46 + local.tee $4 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15214,10 +15277,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $3 i32.const 6064 call $~lib/array/Array#join - local.tee $44 + local.tee $7 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15235,10 +15298,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $6 i32.const 6512 call $~lib/array/Array#join - local.tee $60 + local.tee $8 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15256,10 +15319,10 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $10 i32.const 6576 call $~lib/array/Array#join - local.tee $57 + local.tee $13 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15277,12 +15340,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $2 i32.load offset=4 - local.get $50 + local.get $2 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $58 + local.tee $16 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15300,10 +15363,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $61 + local.tee $18 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $59 + local.tee $19 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15321,7 +15384,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $5 i32.load offset=4 local.tee $1 i32.const 0 @@ -15334,9 +15397,9 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $49 + local.get $5 call $~lib/array/Array#join - local.tee $0 + local.tee $20 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15354,19 +15417,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $14 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $14 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $48 + local.get $1 call $~lib/array/Array#join - local.tee $1 + local.tee $14 i32.const 8176 call $~lib/string/String.__eq i32.eqz @@ -15378,71 +15441,71 @@ call $~lib/builtins/abort unreachable end - local.get $53 - call $~lib/rt/pure/__release - local.get $46 + local.get $0 call $~lib/rt/pure/__release - local.get $45 + local.get $4 call $~lib/rt/pure/__release - local.get $44 + local.get $3 call $~lib/rt/pure/__release - local.get $43 + local.get $7 call $~lib/rt/pure/__release - local.get $60 + local.get $6 call $~lib/rt/pure/__release - local.get $56 + local.get $8 call $~lib/rt/pure/__release - local.get $57 + local.get $10 call $~lib/rt/pure/__release - local.get $50 + local.get $13 call $~lib/rt/pure/__release - local.get $58 + local.get $2 call $~lib/rt/pure/__release - local.get $61 + local.get $16 call $~lib/rt/pure/__release - local.get $59 + local.get $18 call $~lib/rt/pure/__release - local.get $49 + local.get $19 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $48 + local.get $20 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release i32.const 0 i32.const 2 i32.const 3 i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $38 + local.set $1 i32.const 1 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $37 + local.set $4 i32.const 2 i32.const 2 i32.const 3 i32.const 8304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $36 + local.set $3 i32.const 4 i32.const 2 i32.const 3 i32.const 8336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $35 - local.get $38 + local.set $7 + local.get $1 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 6064 call $~lib/string/String.__eq i32.eqz @@ -15454,12 +15517,12 @@ call $~lib/builtins/abort unreachable end - local.get $37 + local.get $4 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $50 - local.get $1 + local.tee $0 + local.set $18 + local.get $0 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15471,12 +15534,12 @@ call $~lib/builtins/abort unreachable end - local.get $36 + local.get $3 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $49 - local.get $1 + local.tee $0 + local.set $19 + local.get $0 i32.const 8368 call $~lib/string/String.__eq i32.eqz @@ -15488,12 +15551,12 @@ call $~lib/builtins/abort unreachable end - local.get $35 + local.get $7 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $48 - local.get $1 + local.tee $0 + local.set $20 + local.get $0 i32.const 8400 call $~lib/string/String.__eq i32.eqz @@ -15511,14 +15574,14 @@ i32.const 8432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $6 i32.load offset=4 - local.get $55 + local.get $6 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $46 - local.get $1 + local.tee $0 + local.set $14 + local.get $0 i32.const 8464 call $~lib/string/String.__eq i32.eqz @@ -15536,14 +15599,14 @@ i32.const 8496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $8 i32.load offset=4 - local.get $54 + local.get $8 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $45 - local.get $1 + local.tee $0 + local.set $21 + local.get $0 i32.const 8528 call $~lib/string/String.__eq i32.eqz @@ -15561,14 +15624,14 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $10 i32.load offset=4 - local.get $52 + local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $44 - local.get $1 + local.tee $0 + local.set $22 + local.get $0 i32.const 8624 call $~lib/string/String.__eq i32.eqz @@ -15586,14 +15649,14 @@ i32.const 8688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $13 i32.load offset=4 - local.get $51 + local.get $13 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $43 - local.get $1 + local.tee $0 + local.set $23 + local.get $0 i32.const 8736 call $~lib/string/String.__eq i32.eqz @@ -15611,12 +15674,12 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $60 + local.tee $24 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $1 - local.set $56 - local.get $1 + local.tee $0 + local.set $26 + local.get $0 i32.const 8896 call $~lib/string/String.__eq i32.eqz @@ -15634,12 +15697,12 @@ i32.const 9008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $27 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $1 - local.set $58 - local.get $1 + local.tee $0 + local.set $31 + local.get $0 i32.const 9040 call $~lib/string/String.__eq i32.eqz @@ -15657,9 +15720,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 2 i32.const 2 i32.const 3 @@ -15667,7 +15730,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 i32.const 2 i32.const 2 i32.const 3 @@ -15675,14 +15738,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $33 + local.get $0 i32.load offset=4 - local.get $33 + local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $1 - local.set $61 - local.get $1 + local.tee $2 + local.set $32 + local.get $2 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15700,9 +15763,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $2 i32.load offset=4 - local.tee $1 + local.tee $5 i32.const 2 i32.const 0 i32.const 6 @@ -15710,7 +15773,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $5 i32.const 2 i32.const 0 i32.const 6 @@ -15718,14 +15781,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $32 + local.get $2 i32.load offset=4 - local.get $32 + local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $1 - local.set $59 - local.get $1 + local.tee $5 + local.set $33 + local.get $5 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15743,7 +15806,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $5 i32.load offset=4 i32.const 1 i32.const 2 @@ -15751,7 +15814,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $29 i32.load offset=4 i32.const 1 i32.const 2 @@ -15760,16 +15823,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $29 i32.store - local.get $40 + local.get $5 i32.load offset=4 - local.get $40 + local.get $5 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $0 - local.set $1 - local.get $0 + local.tee $28 + local.set $29 + local.get $28 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15781,50 +15844,50 @@ call $~lib/builtins/abort unreachable end - local.get $38 + local.get $1 call $~lib/rt/pure/__release - local.get $37 + local.get $4 call $~lib/rt/pure/__release - local.get $36 + local.get $3 call $~lib/rt/pure/__release - local.get $35 + local.get $7 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $50 + local.get $18 call $~lib/rt/pure/__release - local.get $49 + local.get $19 call $~lib/rt/pure/__release - local.get $48 + local.get $20 call $~lib/rt/pure/__release - local.get $55 + local.get $6 call $~lib/rt/pure/__release - local.get $46 + local.get $14 call $~lib/rt/pure/__release - local.get $54 + local.get $8 call $~lib/rt/pure/__release - local.get $45 + local.get $21 call $~lib/rt/pure/__release - local.get $52 + local.get $10 call $~lib/rt/pure/__release - local.get $44 + local.get $22 call $~lib/rt/pure/__release - local.get $51 + local.get $13 call $~lib/rt/pure/__release - local.get $43 + local.get $23 call $~lib/rt/pure/__release - local.get $60 + local.get $24 call $~lib/rt/pure/__release - local.get $56 + local.get $26 call $~lib/rt/pure/__release - local.get $57 + local.get $27 call $~lib/rt/pure/__release - local.get $58 + local.get $31 call $~lib/rt/pure/__release - local.get $61 + local.get $32 call $~lib/rt/pure/__release - local.get $59 + local.get $33 call $~lib/rt/pure/__release - local.get $1 + local.get $29 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -15834,7 +15897,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $3 i32.load offset=4 local.tee $1 i32.const 1 @@ -15868,9 +15931,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $58 + local.get $3 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $61 + local.tee $7 i32.load offset=12 i32.const 10 i32.ne @@ -15883,14 +15946,14 @@ unreachable end loop $for-loop|1 - local.get $41 + local.get $12 i32.const 10 i32.lt_s if - local.get $61 - local.get $41 + local.get $7 + local.get $12 call $~lib/array/Array#__get - local.get $41 + local.get $12 i32.ne if i32.const 0 @@ -15900,10 +15963,10 @@ call $~lib/builtins/abort unreachable end - local.get $41 + local.get $12 i32.const 1 i32.add - local.set $41 + local.set $12 br $for-loop|1 end end @@ -15913,7 +15976,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $6 i32.load offset=4 local.tee $1 i32.const 1 @@ -15947,17 +16010,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $59 + local.get $6 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $56 + local.set $1 i32.const 8 i32.const 2 i32.const 15 i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 - local.get $56 + local.set $4 + local.get $1 i32.load offset=12 i32.const 8 i32.ne @@ -15970,21 +16033,21 @@ unreachable end i32.const 0 - local.set $41 + local.set $12 loop $for-loop|2 - local.get $41 - local.get $57 + local.get $12 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $56 - local.get $41 + local.get $1 + local.get $12 call $~lib/array/Array#__get - local.tee $0 - local.get $57 - local.get $41 + local.tee $8 + local.get $4 + local.get $12 call $~lib/array/Array#__get - local.tee $1 + local.tee $10 call $~lib/string/String.__eq i32.eqz if @@ -15995,14 +16058,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $8 call $~lib/rt/pure/__release - local.get $1 + local.get $10 call $~lib/rt/pure/__release - local.get $41 + local.get $12 i32.const 1 i32.add - local.set $41 + local.set $12 br $for-loop|2 end end @@ -16012,9 +16075,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $12 i32.load offset=4 - local.tee $1 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 @@ -16022,7 +16085,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $8 i32.const 0 i32.const 2 i32.const 3 @@ -16030,9 +16093,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $0 + local.get $12 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $1 + local.tee $8 i32.load offset=12 if i32.const 0 @@ -16042,33 +16105,33 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $12 call $~lib/rt/pure/__release - local.get $1 + local.get $8 call $~lib/rt/pure/__release - local.get $34 + local.get $9 call $~lib/rt/pure/__release - local.get $30 + local.get $25 call $~lib/rt/pure/__release - local.get $31 + local.get $15 call $~lib/rt/pure/__release - local.get $26 + local.get $30 call $~lib/rt/pure/__release - local.get $33 + local.get $0 call $~lib/rt/pure/__release - local.get $32 + local.get $2 call $~lib/rt/pure/__release - local.get $40 + local.get $5 call $~lib/rt/pure/__release - local.get $58 + local.get $3 call $~lib/rt/pure/__release - local.get $61 + local.get $7 call $~lib/rt/pure/__release - local.get $59 + local.get $6 call $~lib/rt/pure/__release - local.get $56 + local.get $1 call $~lib/rt/pure/__release - local.get $57 + local.get $4 call $~lib/rt/pure/__release ) (func $~start From 76f7b9b35cc7da99bf1e269524919cc98b26b681 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 19 Apr 2020 14:24:22 +0300 Subject: [PATCH 29/34] remove vacuum at the end --- cli/asc.js | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 525c071a77..1539fe0f69 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -843,7 +843,6 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); - add("vacuum"); } add("remove-unused-brs"); add("remove-unused-names"); From 3b9f94655d7d77b4c37bb0d9315b61c42a1b3975 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 21 Apr 2020 00:07:21 +0300 Subject: [PATCH 30/34] try other approach --- cli/asc.js | 5 +- tests/compiler/assert-nonnull.optimized.wat | 14 +- tests/compiler/do.optimized.wat | 33 +- .../extends-baseaggregate.optimized.wat | 44 +- tests/compiler/for.optimized.wat | 36 +- .../implicit-getter-setter.optimized.wat | 54 +- tests/compiler/infer-array.optimized.wat | 20 +- tests/compiler/infer-generic.optimized.wat | 12 +- tests/compiler/instanceof-class.optimized.wat | 7 +- tests/compiler/issues/1095.optimized.wat | 17 +- tests/compiler/number.optimized.wat | 79 +- tests/compiler/possibly-null.optimized.wat | 8 +- .../rc/logical-and-mismatch.optimized.wat | 12 +- .../rc/logical-or-mismatch.optimized.wat | 14 +- tests/compiler/rc/rereturn.optimized.wat | 52 +- tests/compiler/resolve-access.optimized.wat | 17 +- tests/compiler/resolve-binary.optimized.wat | 119 +- .../resolve-elementaccess.optimized.wat | 41 +- .../resolve-function-expression.optimized.wat | 6 +- tests/compiler/resolve-new.optimized.wat | 6 +- .../resolve-propertyaccess.optimized.wat | 17 +- tests/compiler/resolve-ternary.optimized.wat | 52 +- tests/compiler/resolve-unary.optimized.wat | 17 +- .../retain-release-sanity.optimized.wat | 171 +- tests/compiler/rt/stub-realloc.optimized.wat | 16 +- tests/compiler/runtime-full.optimized.wat | 52 +- .../compiler/std/array-literal.optimized.wat | 54 +- tests/compiler/std/array.optimized.wat | 2475 +- tests/compiler/std/arraybuffer.optimized.wat | 76 +- tests/compiler/std/dataview.optimized.wat | 62 +- tests/compiler/std/libm.optimized.wat | 118 +- tests/compiler/std/map.optimized.wat | 3404 +- tests/compiler/std/math.optimized.wat | 114 +- .../compiler/std/object-literal.optimized.wat | 23 +- .../std/operator-overloading.optimized.wat | 4 +- tests/compiler/std/pointer.optimized.wat | 2 +- tests/compiler/std/set.optimized.wat | 3182 +- tests/compiler/std/staticarray.optimized.wat | 54 +- .../std/string-casemapping.optimized.wat | 157 +- .../std/string-encoding.optimized.wat | 96 +- tests/compiler/std/string.optimized.wat | 66 +- tests/compiler/std/symbol.optimized.wat | 142 +- tests/compiler/std/typedarray.optimized.wat | 38003 ++++++++-------- tests/compiler/wasi/seed.optimized.wat | 4 +- tests/compiler/wasi/trace.optimized.wat | 82 +- tests/compiler/while.optimized.wat | 55 +- 46 files changed, 24668 insertions(+), 24426 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 1539fe0f69..f3cf62ce63 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -720,10 +720,10 @@ exports.main = function main(argv, options, callback) { add("post-assemblyscript"); } add("dce"); + add("inlining"); // differs add("remove-unused-brs"); add("remove-unused-names"); - add("optimize-instructions"); - add("inlining"); // differs + add("optimize-instructions"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs @@ -743,6 +743,7 @@ exports.main = function main(argv, options, callback) { } add("simplify-locals-nostructure"); add("vacuum"); + add("inlining-optimizing"); // differs add("reorder-locals"); add("remove-unused-brs"); // if (optimizeLevel >= 3 || shrinkLevel >= 2) { // do it later diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 7422e8e1e5..870af63c48 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -140,10 +140,9 @@ (local $1 i32) block $folding-inner0 local.get $0 - local.tee $1 i32.eqz br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/array/Array#__get local.tee $0 local.get $0 @@ -167,10 +166,9 @@ (local $1 i32) block $folding-inner0 local.get $0 - local.tee $1 i32.eqz br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/array/Array#__get local.tee $0 local.get $0 @@ -215,8 +213,8 @@ (local $1 i32) local.get $0 call_indirect (type $none_=>_i32) - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -237,8 +235,8 @@ local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 89af7877dd..bf359b5e58 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1047,6 +1047,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 global.set $do/ran i32.const 10 @@ -1187,14 +1188,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|03 + loop $do-continue|06 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|03 + br_if $do-continue|06 end local.get $1 i32.const 10 @@ -1215,7 +1216,7 @@ local.set $0 i32.const 0 local.set $1 - loop $do-continue|04 + loop $do-continue|03 local.get $0 i32.const 1 i32.add @@ -1232,7 +1233,7 @@ i32.rem_s br_if $do-continue|1 end - br $do-continue|04 + br $do-continue|03 end end local.get $0 @@ -1263,11 +1264,11 @@ global.set $do/ran call $do/Ref#constructor local.set $0 - loop $do-continue|05 - local.get $2 + loop $do-continue|04 + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 10 i32.eq if @@ -1286,9 +1287,9 @@ end local.get $1 local.tee $0 - br_if $do-continue|05 + br_if $do-continue|04 end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1324,12 +1325,10 @@ end i32.const 0 global.set $do/ran - i32.const 0 - local.set $2 call $do/Ref#constructor local.set $0 - loop $do-continue|06 - block $do-break|0 + loop $do-continue|045 + block $do-break|05 local.get $2 i32.const 1 i32.add @@ -1344,13 +1343,13 @@ end i32.const 0 local.set $0 - br $do-break|0 + br $do-break|05 end call $do/Ref#constructor - local.tee $1 + local.tee $3 call $~lib/rt/pure/__release - local.get $1 - br_if $do-continue|06 + local.get $3 + br_if $do-continue|045 end end local.get $2 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index e0b0674624..6a1928e13b 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -916,9 +916,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -927,14 +927,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -943,18 +943,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -966,9 +966,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -985,7 +985,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -993,9 +993,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1007,11 +1007,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1021,23 +1021,23 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2a8bdf7dc8..dbad2a045a 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1161,12 +1161,12 @@ global.set $for/ran i32.const 10 local.set $1 - loop $for-loop|03 + loop $for-loop|04 local.get $1 i32.const 1 i32.sub local.tee $1 - br_if $for-loop|03 + br_if $for-loop|04 end local.get $1 if @@ -1183,14 +1183,14 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|05 + loop $for-loop|06 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $for-loop|05 + br_if $for-loop|06 end local.get $1 i32.const 10 @@ -1263,7 +1263,7 @@ global.set $for/ran call $for/Ref#constructor local.set $1 - loop $for-loop|04 + loop $for-loop|03 local.get $1 if local.get $3 @@ -1288,7 +1288,7 @@ end local.get $0 local.set $1 - br $for-loop|04 + br $for-loop|03 end end local.get $3 @@ -1329,14 +1329,14 @@ global.set $for/ran call $for/Ref#constructor call $for/Ref#constructor - local.set $0 + local.set $1 call $~lib/rt/pure/__release - loop $for-loop|06 + loop $for-loop|05 block $for-break0 call $for/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 @@ -1345,20 +1345,20 @@ 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 $for-break0 end call $for/Ref#constructor - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.set $0 - br $for-loop|06 + local.set $1 + br $for-loop|05 end end end @@ -1373,7 +1373,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 1040 @@ -1384,7 +1384,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 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 454a19e0c9..b55ef1d27d 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -913,15 +913,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -929,14 +929,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -945,18 +945,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -967,18 +967,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -987,7 +987,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -995,9 +995,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1009,11 +1009,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1023,25 +1023,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ddcc193399..4d93f0286b 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -288,6 +288,7 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/stub/__alloc @@ -295,27 +296,26 @@ local.get $0 local.get $1 i32.shl - local.tee $1 - local.set $5 - local.get $1 + local.tee $4 + local.set $6 + local.get $4 i32.const 0 call $~lib/rt/stub/__alloc - local.set $4 + local.set $1 local.get $3 if - local.get $4 + local.get $1 local.get $3 - local.get $5 + local.get $6 call $~lib/memory/memory.copy end - local.get $4 - local.tee $3 + local.get $1 i32.store local.get $2 - local.get $3 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $4 i32.store offset=8 local.get $2 local.get $0 diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 8f605b0703..509f352db5 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -39,20 +39,20 @@ (local $3 i32) i32.const 1132 i32.load - local.set $2 + local.set $1 loop $for-loop|0 local.get $0 - local.get $2 + local.get $1 i32.const 1132 i32.load - local.tee $3 + local.tee $2 + local.get $1 local.get $2 - local.get $3 i32.lt_s select i32.lt_s if - local.get $1 + local.get $3 i32.const 1124 i32.load local.get $0 @@ -63,7 +63,7 @@ local.get $0 i32.const 1120 call $start:infer-generic~anonymous|0 - local.set $1 + local.set $3 local.get $0 i32.const 1 i32.add diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 0a53353118..e1d5c7c1c4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -92,13 +92,12 @@ i32.const 6 call $~lib/rt/stub/__alloc local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 5 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 global.set $instanceof-class/b block $__inlined_func$instanceof-class/Child~instanceof (result i32) i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 555c78f813..ca1f767a6d 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -968,8 +968,9 @@ i32.store local.get $1 local.tee $0 - i32.load local.tee $2 + i32.load + local.tee $1 i32.eqz if i32.const 0 @@ -980,21 +981,21 @@ unreachable end local.get $2 - local.get $0 i32.load - local.tee $1 + local.tee $0 + local.get $1 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 $0 call $~lib/rt/pure/__release end - local.get $0 local.get $2 + local.get $1 i32.store - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 86a856737f..bd0b376801 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -190,44 +190,45 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - 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 + i32.eqz + if + i32.const 1040 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 0 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 1040 + i32.const 45 + i32.store16 end + local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -1456,7 +1457,7 @@ i32.const 2544 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1481,7 +1482,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -1494,7 +1495,7 @@ unreachable end i32.const -5 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -1507,7 +1508,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -1524,7 +1525,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2464 call $~lib/string/String.__eq i32.eqz @@ -1541,7 +1542,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1583,7 +1584,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1601,7 +1602,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2464 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index 8a344aa5aa..cb9bd243f8 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/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 6a906a7a83..3884f01a39 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -966,14 +966,14 @@ global.set $rc/logical-and-mismatch/gloRef call $rc/logical-and-mismatch/Ref#constructor local.tee $0 - if + if (result i32) local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain - local.set $0 + else + local.get $0 end - local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef local.tee $0 @@ -986,13 +986,13 @@ call $~lib/rt/pure/__release call $rc/logical-and-mismatch/Ref#constructor local.tee $0 - if + if (result i32) local.get $0 call $~lib/rt/pure/__release call $rc/logical-and-mismatch/Ref#constructor - local.set $0 + else + local.get $0 end - local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 946c55476b..82d1e68b88 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -966,15 +966,14 @@ global.set $rc/logical-or-mismatch/gloRef call $rc/logical-or-mismatch/Ref#constructor local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__retain - local.set $0 end - local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef local.tee $0 @@ -987,14 +986,13 @@ call $~lib/rt/pure/__release call $rc/logical-or-mismatch/Ref#constructor local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else local.get $0 call $~lib/rt/pure/__release call $rc/logical-or-mismatch/Ref#constructor - local.set $0 end - local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 160b6e5eb6..0a40a50754 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -899,15 +899,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -915,14 +915,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -931,18 +931,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -953,18 +953,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -973,7 +973,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -981,9 +981,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -995,11 +995,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1009,23 +1009,23 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 0c21077548..01b1ea4b45 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -433,13 +433,13 @@ i64.const 10 i64.div_u local.set $0 - local.get $2 local.get $1 i32.const 1 i32.sub local.tee $1 i32.const 1 i32.shl + local.get $2 i32.add local.get $4 i32.const 48 @@ -522,27 +522,26 @@ local.tee $0 i64.const 1 i64.store + i32.const 1184 + local.set $1 local.get $0 i64.load i32.wrap_i64 - local.tee $1 + local.tee $0 if - local.get $1 + local.get $0 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.tee $1 + local.get $0 local.get $2 call $~lib/util/number/utoa_simple - else - i32.const 1184 - local.set $0 end - local.get $0 + local.get $1 ) (func $~start i32.const 1200 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 3f30383508..41fde02f73 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -319,45 +319,46 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - 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/stub/__alloc - local.tee $2 + i32.eqz + if + i32.const 1200 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 0 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 1200 + i32.const 45 + i32.store16 end + local.get $2 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) @@ -1517,7 +1518,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1534,7 +1535,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1551,7 +1552,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1568,7 +1569,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1597,7 +1598,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1614,7 +1615,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1631,7 +1632,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 2512 call $~lib/string/String.__eq i32.eqz @@ -1648,7 +1649,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1665,7 +1666,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1682,7 +1683,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1699,7 +1700,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 2544 call $~lib/string/String.__eq i32.eqz @@ -1716,7 +1717,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1729,7 +1730,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1742,7 +1743,7 @@ unreachable end i32.const -1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2576 call $~lib/string/String.__eq i32.eqz @@ -1755,7 +1756,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1768,7 +1769,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1781,7 +1782,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1806,7 +1807,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2512 call $~lib/string/String.__eq i32.eqz @@ -1819,7 +1820,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1832,7 +1833,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1845,7 +1846,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1858,7 +1859,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1871,7 +1872,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1884,7 +1885,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1897,7 +1898,7 @@ unreachable end i32.const 0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1200 call $~lib/string/String.__eq i32.eqz @@ -1910,7 +1911,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1923,7 +1924,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index c42f7a7633..46f8e8e8c0 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1718,9 +1718,9 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $1 local.get $3 i32.load + local.get $1 i32.add i32.eq if @@ -1875,31 +1875,29 @@ i32.add i32.load8_u ) - (func $~lib/number/U8#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - block $__inlined_func$~lib/util/number/utoa32 (result i32) - i32.const 2624 + i32.const 2624 + local.set $1 + local.get $0 + i32.const 255 + i32.and + local.tee $0 + if local.get $0 - i32.const 255 - i32.and - local.tee $1 - i32.eqz - br_if $__inlined_func$~lib/util/number/utoa32 - drop - local.get $1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $1 + local.tee $1 local.get $0 - call $~lib/util/number/utoa_simple local.get $2 + call $~lib/util/number/utoa_simple end + local.get $1 ) (func $start:resolve-elementaccess (local $0 i32) @@ -2001,14 +1999,13 @@ i32.const 7 call $~lib/rt/stub/__alloc local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 i32.const 8 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/buf @@ -2023,7 +2020,7 @@ global.get $resolve-elementaccess/buf i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2656 call $~lib/string/String.__eq i32.eqz @@ -2038,7 +2035,7 @@ global.get $resolve-elementaccess/buf i32.const 1 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2688 call $~lib/string/String.__eq i32.eqz @@ -2062,7 +2059,7 @@ local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2720 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 6bb92a3959..c45ef9ad6e 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -172,16 +172,16 @@ local.set $1 local.get $2 if - local.get $3 + local.get $0 i32.load16_u local.tee $2 - local.get $0 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $2 + local.get $4 i32.sub return end diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index b06a5f2b6d..83de4829d8 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -4,7 +4,7 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc + (func $resolve-new/Foo#constructor (local $0 i32) (local $1 i32) (local $2 i32) @@ -72,7 +72,7 @@ (func $~start i32.const 1024 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor + call $resolve-new/Foo#constructor ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 2297f6e46d..0840531aee 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -120,14 +120,15 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.const 10 i32.ge_u @@ -174,26 +175,26 @@ i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $3 + local.tee $5 local.set $4 loop $do-continue|0 local.get $0 i32.const 10 i32.rem_u - local.set $5 + local.set $3 local.get $0 i32.const 10 i32.div_u local.set $0 - local.get $4 local.get $2 i32.const 1 i32.sub local.tee $2 i32.const 1 i32.shl + local.get $4 i32.add - local.get $5 + local.get $3 i32.const 48 i32.add i32.store16 @@ -202,11 +203,11 @@ end local.get $1 if - local.get $3 + local.get $5 i32.const 45 i32.store16 end - local.get $3 + local.get $5 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index d0f016834d..e83b7757a0 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -917,15 +917,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -933,14 +933,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -949,18 +949,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -971,18 +971,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -991,7 +991,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -999,9 +999,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1013,11 +1013,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1027,23 +1027,23 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 148c781efa..51ae97c282 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -127,14 +127,15 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.const 10 i32.ge_u @@ -181,26 +182,26 @@ i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $3 + local.tee $5 local.set $4 loop $do-continue|0 local.get $0 i32.const 10 i32.rem_u - local.set $5 + local.set $3 local.get $0 i32.const 10 i32.div_u local.set $0 - local.get $4 local.get $2 i32.const 1 i32.sub local.tee $2 i32.const 1 i32.shl + local.get $4 i32.add - local.get $5 + local.get $3 i32.const 48 i32.add i32.store16 @@ -209,11 +210,11 @@ end local.get $1 if - local.get $3 + local.get $5 i32.const 45 i32.store16 end - local.get $3 + local.get $5 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index aaed61f712..da8f46a05b 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -922,9 +922,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -933,14 +933,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -949,18 +949,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -972,9 +972,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -991,7 +991,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -999,9 +999,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1013,11 +1013,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1027,25 +1027,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1769,7 +1769,7 @@ i32.const 12 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 12 call $~lib/memory/memory.fill i32.const 16 @@ -1788,8 +1788,9 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 + local.get $1 + local.set $0 + local.get $1 local.get $3 i32.load local.tee $4 @@ -1805,7 +1806,7 @@ local.get $0 i32.store local.get $3 - local.get $2 + local.get $1 i32.store offset=4 local.get $3 i32.const 12 @@ -1819,7 +1820,7 @@ call $~lib/array/Array#push local.get $3 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.lt_s if @@ -1832,24 +1833,24 @@ end local.get $3 i32.load offset=4 - local.get $2 + 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 $3 - local.get $2 + local.get $1 i32.store offset=12 local.get $3 call $~lib/rt/pure/__release i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1868,8 +1869,9 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 + local.get $1 + local.set $0 + local.get $1 local.get $3 i32.load local.tee $4 @@ -1885,7 +1887,7 @@ local.get $0 i32.store local.get $3 - local.get $2 + local.get $1 i32.store offset=4 local.get $3 i32.const 0 @@ -1895,14 +1897,14 @@ i32.store offset=12 local.get $3 loop $for-loop|0 - local.get $1 + local.get $2 i32.const 10 i32.lt_s if i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1921,8 +1923,9 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $2 - local.tee $0 + local.get $1 + local.set $0 + local.get $1 local.get $3 i32.load local.tee $5 @@ -1938,7 +1941,7 @@ local.get $0 i32.store local.get $3 - local.get $2 + local.get $1 i32.store offset=4 local.get $3 i32.const 0 @@ -1956,21 +1959,21 @@ local.get $3 local.get $3 i32.load offset=12 - local.tee $5 + local.tee $1 i32.const 1 i32.add - local.tee $2 + local.tee $5 call $~lib/array/ensureSize local.get $3 i32.load offset=4 - local.get $5 + local.get $1 i32.const 2 i32.shl i32.add i32.const 1344 i32.store local.get $3 - local.get $2 + local.get $5 i32.store offset=12 local.get $0 i32.const 1 @@ -1981,10 +1984,10 @@ end local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end @@ -1992,97 +1995,103 @@ i32.const 1360 i32.const 1392 call $~lib/string/String.__concat - local.tee $1 + local.tee $3 i32.const 1456 call $~lib/string/String.__concat - local.get $1 + 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 $2 + local.tee $3 i32.const 0 i32.store i32.const 4 i32.const 7 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 i32.store + local.get $1 + local.set $0 + local.get $1 local.get $3 - local.tee $0 - local.get $2 - local.tee $1 - i32.load local.tee $4 + i32.load + local.tee $2 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $4 + local.get $2 call $~lib/rt/pure/__release end - local.get $1 + local.get $4 local.get $0 i32.store local.get $1 + local.set $2 + local.get $4 local.set $0 + local.get $1 local.get $3 - local.tee $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.tee $1 + local.get $1 + local.set $2 local.get $3 - local.tee $0 + local.get $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store + local.get $3 + local.set $0 + local.get $3 local.get $2 - local.tee $1 - local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $3 local.get $2 - local.tee $1 + local.set $0 + local.get $3 + local.set $2 + local.get $1 + local.get $3 i32.load local.tee $4 i32.ne @@ -2093,28 +2102,28 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $1 + local.get $2 local.get $0 i32.store - local.get $2 local.get $3 + local.get $1 i32.load local.tee $0 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $0 call $~lib/rt/pure/__release end - local.get $3 local.get $1 - i32.store local.get $2 - call $~lib/rt/pure/__release + i32.store local.get $3 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) (func $~start diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 9fe92e6df9..75fdb067eb 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -531,12 +531,14 @@ end global.get $rt/stub-realloc/ptr local.tee $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -562,9 +564,9 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $0 local.get $1 i32.load + local.get $0 i32.add i32.eq if diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index fa32ef6903..feefb2fd3e 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -899,15 +899,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -915,14 +915,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -931,18 +931,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -953,18 +953,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -973,7 +973,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -981,9 +981,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -995,11 +995,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1009,23 +1009,23 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index ddd2247e86..878977b218 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -951,15 +951,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -967,14 +967,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -983,18 +983,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1005,18 +1005,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -1025,7 +1025,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -1033,9 +1033,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1047,11 +1047,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1061,25 +1061,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index e81a55fa75..c97b37a518 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -6,13 +6,13 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (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))) @@ -1139,9 +1139,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -1149,14 +1149,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -1165,18 +1165,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1188,9 +1188,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -1207,7 +1207,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1215,9 +1215,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1229,11 +1229,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1243,25 +1243,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -3995,6 +3995,135 @@ local.get $4 f32.store ) + (func $~lib/array/Array#sort (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 f32) + (local $7 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + 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 $2 + local.get $1 + i32.const 2 + i32.eq + if + local.get $2 + f32.load offset=4 + local.tee $6 + local.get $2 + f32.load + local.tee $5 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $5 + f32.store offset=4 + local.get $2 + local.get $6 + f32.store + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $2 + local.set $4 + local.get $1 + local.set $3 + loop $for-loop|0 + local.get $7 + local.get $3 + i32.lt_s + if + local.get $4 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 + local.get $7 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $5 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $5 + f32.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + else + local.get $2 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) @@ -4275,98 +4404,227 @@ local.get $4 f64.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 - i64.reinterpret_f64 - local.tee $2 - local.get $2 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.tee $2 - local.get $1 - i64.reinterpret_f64 - local.tee $3 - local.get $3 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.tee $3 - i64.gt_s - local.get $2 - local.get $3 - i64.lt_s - i32.sub - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - local.get $1 + (func $~lib/array/Array#sort (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) + (local $7 i32) local.get $0 i32.load offset=12 - i32.ge_u + local.tee $1 + i32.const 1 + i32.le_s if - i32.const 1504 - i32.const 1088 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable + local.get $0 + call $~lib/rt/pure/__retain + return end local.get $0 i32.load offset=4 + local.set $2 local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - ) - (func $~lib/util/sort/weakHeapSort (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) - local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u i32.const 2 - i32.shl - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $5 - i32.const 0 - local.get $3 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 - i32.sub - local.set $4 - loop $for-loop|0 - local.get $4 + i32.eq + if + local.get $2 + f64.load offset=8 + local.tee $6 + local.get $2 + f64.load + local.tee $5 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 - i32.gt_s + i32.lt_s if - local.get $4 - local.set $3 - loop $while-continue|1 + local.get $2 + local.get $5 + f64.store offset=8 + local.get $2 + local.get $6 + f64.store + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $2 + local.set $4 + local.get $1 + local.set $3 + loop $for-loop|0 + local.get $7 + local.get $3 + i32.lt_s + if + local.get $4 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 + local.get $7 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $5 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $6 + f64.store + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + else + local.get $2 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + local.get $2 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $2 + local.get $1 + i64.reinterpret_f64 + local.tee $3 + local.get $3 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $3 + i64.gt_s + local.get $2 + local.get $3 + i64.lt_s + i32.sub + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 1504 + i32.const 1088 + i32.const 104 + i32.const 42 + 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/util/sort/weakHeapSort (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) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $5 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|0 + local.get $4 + i32.const 0 + i32.gt_s + if + local.get $4 + local.set $3 + loop $while-continue|1 local.get $3 i32.const 1 i32.and - local.get $5 local.get $3 i32.const 6 i32.shr_u i32.const 2 i32.shl + local.get $5 i32.add i32.load local.get $3 @@ -4386,34 +4644,34 @@ br $while-continue|1 end end - local.get $0 local.get $3 i32.const 1 i32.shr_s - local.tee $7 + local.tee $6 i32.const 2 i32.shl + local.get $0 i32.add i32.load local.tee $3 - local.get $0 local.get $4 i32.const 2 i32.shl + local.get $0 i32.add i32.load - local.tee $6 + local.tee $7 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 local.get $4 i32.const 5 i32.shr_u i32.const 2 i32.shl + local.get $5 i32.add local.tee $8 local.get $8 @@ -4425,19 +4683,19 @@ i32.shl i32.xor i32.store - local.get $0 local.get $4 i32.const 2 i32.shl + local.get $0 i32.add local.get $3 i32.store - local.get $0 - local.get $7 + local.get $6 i32.const 2 i32.shl + local.get $0 i32.add - local.get $6 + local.get $7 i32.store end local.get $4 @@ -4460,10 +4718,10 @@ i32.load local.set $1 local.get $0 - local.get $0 local.get $4 i32.const 2 i32.shl + local.get $0 i32.add local.tee $3 i32.load @@ -4474,12 +4732,12 @@ i32.const 1 local.set $1 loop $while-continue|3 - local.get $5 local.get $1 i32.const 5 i32.shr_u i32.const 2 i32.shl + local.get $5 i32.add i32.load local.get $1 @@ -4509,27 +4767,27 @@ local.get $0 i32.load local.tee $3 - local.get $0 local.get $1 i32.const 2 i32.shl + local.get $0 i32.add i32.load - local.tee $6 + local.tee $7 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 local.get $1 i32.const 5 i32.shr_u i32.const 2 i32.shl + local.get $5 i32.add - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 i32.load i32.const 1 local.get $1 @@ -4538,15 +4796,15 @@ i32.shl i32.xor i32.store - local.get $0 local.get $1 i32.const 2 i32.shl + local.get $0 i32.add local.get $3 i32.store local.get $0 - local.get $6 + local.get $7 i32.store end local.get $1 @@ -4588,7 +4846,7 @@ (local $8 i32) local.get $0 i32.load offset=12 - local.tee $3 + local.tee $2 i32.const 1 i32.le_s if @@ -4598,54 +4856,54 @@ end local.get $0 i32.load offset=4 - local.set $2 - local.get $3 + local.set $5 + local.get $2 i32.const 2 i32.eq if - local.get $2 + local.get $5 i32.load offset=4 - local.tee $3 - local.get $2 + local.tee $2 + local.get $5 i32.load - local.tee $5 + local.tee $3 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $2 local.get $5 + local.get $3 i32.store offset=4 + local.get $5 local.get $2 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain return end - local.get $3 + local.get $2 i32.const 256 i32.lt_s if - local.get $3 - local.set $5 + local.get $2 + local.set $3 local.get $1 - local.set $7 + local.set $4 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $6 + local.get $3 i32.lt_s if - local.get $2 - local.get $4 + local.get $5 + local.get $6 i32.const 2 i32.shl i32.add i32.load - local.set $6 - local.get $4 + local.set $7 + local.get $6 i32.const 1 i32.sub local.set $1 @@ -4654,26 +4912,26 @@ i32.const 0 i32.ge_s if - local.get $6 - local.get $2 + local.get $7 + local.get $5 local.get $1 i32.const 2 i32.shl i32.add i32.load local.tee $8 - local.get $7 + local.get $4 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if local.get $1 - local.tee $3 + local.tee $2 i32.const 1 i32.sub local.set $1 + local.get $5 local.get $2 - local.get $3 i32.const 1 i32.add i32.const 2 @@ -4685,25 +4943,25 @@ end end end - local.get $2 + local.get $5 local.get $1 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $7 i32.store - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|0 end end else + local.get $5 local.get $2 - local.get $3 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -4826,28 +5084,29 @@ (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 $3 - local.tee $0 + local.tee $2 + local.set $3 + i32.const 1 + local.set $0 + local.get $2 i32.load offset=12 local.set $4 loop $for-loop|0 - local.get $2 + local.get $0 local.get $4 i32.lt_s if i32.const 0 + local.get $3 local.get $0 - local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get + local.get $3 local.get $0 - local.get $2 call $~lib/array/Array#__get local.get $1 call_indirect (type $i32_i32_=>_i32) @@ -4855,10 +5114,10 @@ i32.gt_s br_if $__inlined_func$std/array/isSorted drop - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -4873,7 +5132,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $start:std/array~anonymous|44 (param $0 i32) (param $1 i32) (result i32) @@ -4930,89 +5189,6 @@ call $~lib/rt/pure/__release end ) - (func $std/array/createReverseOrderedNestedArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - 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 $0 - local.set $1 - local.get $0 - local.get $2 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.store offset=8 - local.get $2 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - local.get $3 - i32.sub - call $~lib/array/Array#__set - local.get $2 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 @@ -5032,7 +5208,7 @@ (local $8 i32) local.get $0 i32.load offset=12 - local.tee $5 + local.tee $6 i32.const 1 i32.le_s if @@ -5043,7 +5219,7 @@ local.get $0 i32.load offset=4 local.set $2 - local.get $5 + local.get $6 i32.const 2 i32.eq if @@ -5052,14 +5228,14 @@ local.tee $3 local.get $2 i32.load - local.tee $5 + local.tee $6 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if local.get $2 - local.get $5 + local.get $6 i32.store offset=4 local.get $2 local.get $3 @@ -5072,20 +5248,20 @@ local.get $2 local.set $3 local.get $1 - local.set $7 + local.set $4 loop $for-loop|0 - local.get $4 local.get $5 + local.get $6 i32.lt_s if local.get $3 - local.get $4 + local.get $5 i32.const 2 i32.shl i32.add i32.load - local.set $6 - local.get $4 + local.set $7 + local.get $5 i32.const 1 i32.sub local.set $1 @@ -5094,7 +5270,7 @@ i32.const 0 i32.ge_s if - local.get $6 + local.get $7 local.get $3 local.get $1 i32.const 2 @@ -5102,7 +5278,7 @@ i32.add i32.load local.tee $8 - local.get $7 + local.get $4 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s @@ -5132,12 +5308,12 @@ i32.const 2 i32.shl i32.add - local.get $6 + local.get $7 i32.store - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -5151,50 +5327,51 @@ (local $5 i32) (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 + local.tee $2 + local.set $3 + i32.const 1 + local.set $0 + local.get $2 i32.load offset=12 local.set $6 loop $for-loop|0 - local.get $2 + local.get $0 local.get $6 i32.lt_s if + local.get $3 local.get $0 - local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $3 + local.tee $4 + local.get $3 local.get $0 - local.get $2 call $~lib/array/Array#__get - local.tee $4 + local.tee $5 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 + local.get $5 + 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 - local.get $2 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -5209,92 +5386,8 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - ) - (func $std/array/createReverseOrderedElementsArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 2048 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 0 - i32.const 2048 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 14 - 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 $0 - local.set $1 - local.get $0 - local.get $2 - i32.load - local.tee $4 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $1 - i32.store - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 2048 - i32.store offset=8 - local.get $2 - i32.const 512 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 512 - i32.lt_s - if - i32.const 4 - i32.const 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 511 - local.get $3 - i32.sub - i32.store - local.get $2 - local.get $3 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end local.get $2 + call $~lib/rt/pure/__release ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7399,10 +7492,10 @@ if local.get $3 local.tee $2 - local.get $0 local.get $5 i32.const 2 i32.shl + local.get $0 i32.add i32.load local.tee $3 @@ -7420,11 +7513,11 @@ call $~lib/rt/pure/__retain local.tee $2 local.get $1 + local.get $1 local.get $2 call $~lib/string/String.__concat local.tee $9 local.tee $2 - local.get $1 i32.ne if local.get $2 @@ -7443,11 +7536,11 @@ if local.get $1 local.tee $2 + local.get $2 local.get $4 call $~lib/string/String.__concat local.tee $7 local.tee $1 - local.get $2 i32.ne if local.get $1 @@ -7466,10 +7559,10 @@ br $for-loop|0 end end - local.get $0 local.get $6 i32.const 2 i32.shl + local.get $0 i32.add i32.load local.tee $2 @@ -7488,11 +7581,11 @@ call $~lib/rt/pure/__retain local.tee $0 local.get $1 + local.get $1 local.get $0 call $~lib/string/String.__concat local.tee $0 local.tee $3 - local.get $1 i32.ne if local.get $3 @@ -8600,6 +8693,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8607,7 +8701,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -9074,6 +9167,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -9081,7 +9175,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -9532,21 +9625,21 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 f32) + (local $11 i32) (local $12 i32) (local $13 i32) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 f64) + (local $17 i32) (local $18 i32) - (local $19 i32) + (local $19 f32) (local $20 i32) (local $21 i32) (local $22 i32) (local $23 i32) (local $24 i32) - (local $25 i32) + (local $25 f64) (local $26 i32) (local $27 i32) (local $28 i32) @@ -9555,8 +9648,8 @@ (local $31 i32) (local $32 i32) (local $33 i32) - (local $34 f32) - (local $35 f64) + (local $34 i32) + (local $35 i32) (local $36 i32) (local $37 i32) (local $38 i32) @@ -9581,8 +9674,6 @@ (local $57 i32) (local $58 i32) (local $59 i32) - (local $60 i32) - (local $61 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -9592,52 +9683,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $1 + local.set $2 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $1 + local.get $2 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const 0 i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $0 local.get $1 + local.tee $0 + local.get $2 i32.load - local.tee $3 + local.tee $6 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $3 + local.get $6 call $~lib/rt/pure/__release end - local.get $1 + local.get $2 local.get $0 i32.store - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9651,7 +9742,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9672,7 +9763,7 @@ i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -9696,7 +9787,7 @@ i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -9720,7 +9811,7 @@ i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -9744,7 +9835,7 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $6 call $std/array/isArraysEqual i32.eqz if @@ -9768,7 +9859,7 @@ i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 call $std/array/isArraysEqual i32.eqz if @@ -9781,15 +9872,15 @@ 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 $4 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + call $~lib/rt/pure/__release + local.get $10 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9810,7 +9901,7 @@ i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9835,7 +9926,7 @@ i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9860,7 +9951,7 @@ i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9885,7 +9976,7 @@ i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9910,7 +10001,7 @@ i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9924,15 +10015,15 @@ 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 $4 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + call $~lib/rt/pure/__release + local.get $10 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10195,37 +10286,37 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $2 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 - local.tee $1 - local.get $2 + local.tee $2 + local.get $1 i32.const 2 i32.shl i32.add - local.set $2 + local.set $1 loop $do-continue|0 - local.get $1 + local.get $2 i32.load call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 4 i32.add - local.tee $1 - local.get $2 + local.tee $2 + local.get $1 i32.lt_u br_if $do-continue|0 end @@ -10251,11 +10342,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $2 + local.set $1 global.get $std/array/arr - local.get $2 + 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 @@ -10280,7 +10371,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=12 i32.const 3 i32.ne @@ -10292,14 +10383,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 2 i32.const 3 i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $6 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10314,7 +10405,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10327,7 +10418,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10340,7 +10431,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10353,17 +10444,17 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 46 call $~lib/array/Array#push - local.get $2 + local.get $1 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $2 + local.get $1 call $~lib/array/Array#concat local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10377,7 +10468,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 i32.const 2 i32.ne @@ -10487,7 +10578,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.load offset=12 if i32.const 0 @@ -10497,13 +10588,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 global.get $std/array/arr call $~lib/array/Array#concat - local.set $4 + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -10515,7 +10606,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=12 if i32.const 0 @@ -10525,13 +10616,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10539,19 +10630,19 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $1 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10569,22 +10660,22 @@ i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release + 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/array/Array#copyWithin - local.tee $3 + local.tee $6 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10602,22 +10693,21 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10635,21 +10725,21 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.tee $1 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $25 + local.tee $8 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10667,21 +10757,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.tee $1 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $9 i32.const 5 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10699,21 +10789,21 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.tee $1 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $13 + local.tee $30 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10731,21 +10821,21 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $30 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10763,21 +10853,21 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.tee $1 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $19 + local.tee $17 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10795,9 +10885,10 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $2 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $2 + local.get $0 i32.const 0 i32.const -2 i32.const -1 @@ -10809,7 +10900,7 @@ i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10827,22 +10918,22 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - 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 call $~lib/array/Array#copyWithin - local.tee $22 + local.tee $21 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10860,15 +10951,15 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $24 + local.tee $23 i32.const 5 i32.const 2 i32.const 3 @@ -10893,15 +10984,15 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - 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/array/Array#copyWithin - local.tee $2 + local.tee $0 i32.const 5 i32.const 2 i32.const 3 @@ -10920,53 +11011,53 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $15 + local.get $6 call $~lib/rt/pure/__release - local.get $7 + local.get $10 call $~lib/rt/pure/__release - local.get $25 + local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $24 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $30 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $30 + local.get $17 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $19 + local.get $14 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release - local.get $14 - 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 $26 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release @@ -11142,9 +11233,9 @@ unreachable end global.get $std/array/arr - local.tee $2 - i32.load offset=12 local.tee $1 + i32.load offset=12 + local.tee $2 i32.const 1 i32.lt_s if @@ -11155,7 +11246,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=4 local.tee $0 i32.load @@ -11163,21 +11254,21 @@ local.get $0 i32.const 4 i32.add - local.get $1 + local.get $2 i32.const 1 i32.sub - local.tee $1 + local.tee $2 i32.const 2 i32.shl - local.tee $3 + local.tee $6 call $~lib/memory/memory.copy local.get $0 - local.get $3 + local.get $6 i32.add i32.const 0 i32.store - local.get $2 local.get $1 + local.get $2 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11345,14 +11436,14 @@ unreachable end global.get $std/array/arr - local.tee $2 + local.tee $0 i32.load offset=12 local.tee $1 if - local.get $2 + local.get $0 i32.load offset=4 - local.set $0 - local.get $2 + local.set $2 + local.get $0 i32.load offset=4 local.get $1 i32.const 1 @@ -11362,24 +11453,24 @@ i32.add local.set $1 loop $while-continue|0 - local.get $0 + local.get $2 local.get $1 i32.lt_u if - local.get $0 + local.get $2 i32.load - local.set $2 - local.get $0 + local.set $0 + local.get $2 local.get $1 i32.load i32.store local.get $1 - local.get $2 - i32.store local.get $0 + i32.store + local.get $2 i32.const 4 i32.add - local.set $0 + local.set $2 local.get $1 i32.const 4 i32.sub @@ -11615,18 +11706,18 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $2 i32.const 1 i32.const 2 i32.const 9 i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 - local.set $3 - i32.const 0 - local.set $0 + local.tee $0 + local.set $6 block $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $0 i32.load offset=12 local.tee $1 if (result i32) @@ -11638,19 +11729,19 @@ end if i32.const -1 - local.set $0 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $3 + local.get $6 i32.load offset=4 - local.set $4 + local.set $3 loop $while-continue|022 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $4 - local.get $0 + local.get $3 + local.get $2 i32.const 2 i32.shl i32.add @@ -11658,17 +11749,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|022 end end i32.const -1 - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const -1 i32.ne if @@ -11679,6 +11770,8 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $2 i32.const 1 i32.const 3 i32.const 10 @@ -11686,35 +11779,33 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $1 - local.set $9 - i32.const 0 - local.set $0 + local.set $10 block $__inlined_func$~lib/array/Array#indexOf local.get $1 i32.load offset=12 - local.tee $4 + local.tee $3 if (result i32) i32.const 0 - local.get $4 + local.get $3 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $0 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $9 + local.get $10 i32.load offset=4 - local.set $3 + local.set $6 loop $while-continue|023 - local.get $0 - local.get $4 + local.get $2 + local.get $3 i32.lt_s if - local.get $3 - local.get $0 + local.get $6 + local.get $2 i32.const 3 i32.shl i32.add @@ -11722,17 +11813,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|023 end end i32.const -1 - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const -1 i32.ne if @@ -11743,7 +11834,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -11885,7 +11976,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $0 + local.set $2 i32.const 0 i32.const 1 i32.const 2 @@ -11893,50 +11984,50 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=12 local.tee $1 + i32.load offset=12 + local.tee $3 if (result i32) i32.const 0 - local.get $1 + local.get $3 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $4 + local.get $1 i32.load offset=4 - local.set $9 - loop $while-continue|024 - local.get $0 - local.get $1 + local.set $10 + loop $while-continue|00 + local.get $2 + local.get $3 i32.lt_s if i32.const 1 - local.get $9 - local.get $0 + local.get $10 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $11 + local.tee $19 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $11 - local.get $11 + local.get $19 + local.get $19 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 - br $while-continue|024 + local.set $2 + br $while-continue|00 end end i32.const 0 @@ -11952,7 +12043,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $1 + local.set $2 i32.const 0 i32.const 1 i32.const 3 @@ -11960,50 +12051,50 @@ i32.const 3312 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 $6 if (result i32) i32.const 0 - local.get $3 + local.get $6 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 $15 - loop $while-continue|025 - local.get $1 - local.get $3 + local.set $5 + loop $while-continue|01 + local.get $2 + local.get $6 i32.lt_s if i32.const 1 - local.get $15 - local.get $1 + local.get $5 + local.get $2 i32.const 3 i32.shl i32.add f64.load - local.tee $17 + local.tee $25 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $17 - local.get $17 + local.get $25 + local.get $25 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 - br $while-continue|025 + local.set $2 + br $while-continue|01 end end i32.const 0 @@ -12072,9 +12163,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12082,18 +12173,18 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $4 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12105,14 +12196,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12131,20 +12222,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $0 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $6 + local.tee $7 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12163,7 +12254,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12181,10 +12272,10 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice @@ -12195,7 +12286,7 @@ i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12207,14 +12298,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12232,21 +12323,21 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $19 + local.tee $17 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12258,7 +12349,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 @@ -12283,21 +12374,21 @@ i32.const 3792 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 1 call $~lib/array/Array#splice - local.tee $21 + local.tee $20 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12309,14 +12400,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12334,13 +12425,14 @@ i32.const 3904 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 -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $24 + local.tee $23 i32.const 1 i32.const 2 i32.const 3 @@ -12466,7 +12558,7 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $34 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12490,14 +12582,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $37 + local.tee $35 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12516,7 +12608,7 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12540,14 +12632,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $40 + local.tee $38 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12566,7 +12658,7 @@ i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12590,14 +12682,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $43 + local.tee $41 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12616,7 +12708,7 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12634,21 +12726,20 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.tee $0 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $46 + local.tee $44 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12660,14 +12751,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12685,21 +12776,21 @@ i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $49 + local.tee $47 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12711,14 +12802,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12737,20 +12828,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $2 - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $52 + local.tee $50 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12769,7 +12860,7 @@ i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12790,7 +12881,7 @@ local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $15 + local.tee $10 i32.load offset=12 if i32.const 0 @@ -12816,7 +12907,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $6 i32.load offset=4 local.tee $0 i32.const 1 @@ -12840,13 +12931,13 @@ i32.store offset=16 local.get $1 call $~lib/rt/pure/__release - local.get $9 + local.get $6 i32.const 2 call $~lib/array/Array#splice - local.set $25 - local.get $15 + local.set $24 + local.get $10 call $~lib/rt/pure/__release - local.get $25 + local.get $24 i32.load offset=12 i32.const 2 i32.ne @@ -12858,10 +12949,10 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $24 i32.const 0 call $~lib/array/Array#__get - local.tee $55 + local.tee $53 i32.load i32.const 3 i32.ne @@ -12873,10 +12964,10 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $24 i32.const 1 call $~lib/array/Array#__get - local.tee $56 + local.tee $54 i32.load i32.const 4 i32.ne @@ -12888,7 +12979,7 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $6 i32.load offset=12 i32.const 3 i32.ne @@ -12900,10 +12991,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $6 i32.const 0 call $~lib/array/Array#__get - local.tee $57 + local.tee $55 i32.load i32.const 1 i32.ne @@ -12915,10 +13006,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $6 i32.const 1 call $~lib/array/Array#__get - local.tee $58 + local.tee $56 i32.load i32.const 2 i32.ne @@ -12930,10 +13021,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $6 i32.const 2 call $~lib/array/Array#__get - local.tee $59 + local.tee $57 i32.load i32.const 5 i32.ne @@ -12951,7 +13042,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $10 i32.load offset=4 local.tee $0 i32.const 1 @@ -12964,7 +13055,7 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $15 + local.get $10 call $~lib/array/Array#splice local.tee $30 i32.load offset=12 @@ -13003,7 +13094,7 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $10 i32.load offset=12 i32.const 2 i32.ne @@ -13015,10 +13106,10 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $10 i32.const 0 call $~lib/array/Array#__get - local.tee $60 + local.tee $58 if i32.const 0 i32.const 1296 @@ -13027,7 +13118,7 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $10 i32.const 1 call $~lib/array/Array#__get local.tee $1 @@ -13054,38 +13145,38 @@ end 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 $7 - call $~lib/rt/pure/__release - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $11 call $~lib/rt/pure/__release local.get $13 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 + local.get $14 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release - local.get $14 - 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 $26 call $~lib/rt/pure/__release local.get $27 @@ -13100,6 +13191,10 @@ call $~lib/rt/pure/__release local.get $29 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 @@ -13144,13 +13239,9 @@ 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 $0 call $~lib/rt/pure/__release - local.get $60 + local.get $58 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -13626,17 +13717,17 @@ unreachable end loop $for-loop|0 - local.get $5 + local.get $4 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -13653,11 +13744,11 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $1 + local.set $2 global.get $std/array/arr - local.tee $2 + local.tee $1 i32.load offset=12 - local.tee $5 + local.tee $4 i32.const 2 i32.const 9 i32.const 0 @@ -13665,39 +13756,39 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.set $4 - loop $for-loop|043 - local.get $1 - local.get $5 + local.set $3 + loop $for-loop|041 local.get $2 + local.get $4 + local.get $1 i32.load offset=12 - local.tee $3 + local.tee $5 + local.get $4 local.get $5 - local.get $3 i32.lt_s select i32.lt_s if - local.get $1 + local.get $2 i32.const 2 i32.shl - local.tee $3 - local.get $2 + local.tee $5 + local.get $1 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $11 + local.set $19 local.get $3 - local.get $4 + local.get $5 i32.add - local.get $11 + local.get $19 f32.store - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 - br $for-loop|043 + local.set $2 + br $for-loop|041 end end local.get $0 @@ -14240,132 +14331,14 @@ call $~lib/bindings/Math/random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom - block $__inlined_func$~lib/array/Array#sort (result i32) - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=12 - local.tee $3 - i32.const 1 - i32.le_s - if - local.get $4 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $4 - i32.load offset=4 - local.set $1 - local.get $3 - i32.const 2 - i32.eq - if - local.get $1 - f32.load offset=4 - local.tee $11 - local.get $1 - f32.load - local.tee $34 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $34 - f32.store offset=4 - local.get $1 - local.get $11 - f32.store - end - local.get $4 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $3 - i32.const 256 - i32.lt_s - if - i32.const 0 - local.set $5 - loop $for-loop|00 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $11 - local.get $5 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|1 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $11 - local.get $1 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $34 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.tee $2 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $34 - f32.store - br $while-continue|1 - end - end - end - local.get $1 - local.get $0 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $11 - f32.store - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|00 - end - end - else - local.get $1 - local.get $3 - call $~lib/util/sort/weakHeapSort - end - local.get $4 - call $~lib/rt/pure/__retain - end + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 5280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $~lib/array/Array#sort call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14374,50 +14347,51 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.tee $18 + local.set $0 i32.const 0 local.set $1 block $folding-inner0 - local.get $4 + local.get $2 i32.load offset=12 - local.tee $2 - local.get $7 + local.tee $3 + local.get $0 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $4 - local.get $7 + local.get $0 + local.get $2 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|001 + loop $for-loop|00 local.get $1 - local.get $2 + local.get $3 i32.lt_s if - local.get $4 + local.get $2 local.get $1 call $~lib/array/Array#__get - local.tee $11 - local.get $11 + local.tee $19 + local.get $19 f32.ne if (result i32) - local.get $7 + local.get $0 local.get $1 call $~lib/array/Array#__get - local.tee $11 - local.get $11 + local.tee $19 + local.get $19 f32.ne else i32.const 0 end i32.eqz if - local.get $4 + local.get $2 local.get $1 call $~lib/array/Array#__get - local.get $7 + local.get $0 local.get $1 call $~lib/array/Array#__get f32.ne @@ -14427,7 +14401,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|001 + br $for-loop|00 end end i32.const 1 @@ -14444,194 +14418,77 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#sort (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 5376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $~lib/array/Array#sort + call $~lib/rt/pure/__release + block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 i32.const 3 i32.const 10 - i32.const 5376 + i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=12 - local.tee $6 - i32.const 1 - i32.le_s - if - local.get $3 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $3 - i32.load offset=4 - local.set $1 - local.get $6 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.tee $17 - local.get $1 - f64.load - local.tee $35 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $35 - f64.store offset=8 - local.get $1 - local.get $17 - f64.store - end - local.get $3 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $6 - i32.const 256 - i32.lt_s - if - i32.const 0 - local.set $5 - loop $for-loop|02 - local.get $5 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $17 - local.get $5 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|13 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $17 - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $35 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.tee $2 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $35 - f64.store - br $while-continue|13 - end - end - end - local.get $1 - local.get $0 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $17 - f64.store - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|02 - end - end - else - local.get $1 - local.get $6 - call $~lib/util/sort/weakHeapSort - end - local.get $3 - call $~lib/rt/pure/__retain - end - call $~lib/rt/pure/__release - block $__inlined_func$std/array/isArraysEqual (result i32) - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 5456 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $2 + local.tee $14 + local.set $0 i32.const 0 - local.set $1 + local.set $4 block $folding-inner01 - local.get $3 + local.get $1 i32.load offset=12 local.tee $5 - local.get $2 + local.get $0 i32.load offset=12 i32.ne br_if $folding-inner01 i32.const 1 - local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|025 - local.get $1 + loop $for-loop|02 + local.get $4 local.get $5 i32.lt_s if - local.get $3 local.get $1 + local.get $4 call $~lib/array/Array#__get - local.tee $17 - local.get $17 + local.tee $25 + local.get $25 f64.ne if (result i32) - local.get $2 - local.get $1 + local.get $0 + local.get $4 call $~lib/array/Array#__get - local.tee $17 - local.get $17 + local.tee $25 + local.get $25 f64.ne else i32.const 0 end i32.eqz if - local.get $3 local.get $1 + local.get $4 call $~lib/array/Array#__get - local.get $2 - local.get $1 + local.get $0 + local.get $4 call $~lib/array/Array#__get f64.ne br_if $folding-inner01 end - local.get $1 + local.get $4 i32.const 1 i32.add - local.set $1 - br $for-loop|025 + local.set $4 + br $for-loop|02 end end i32.const 1 @@ -14654,18 +14511,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $13 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $18 + local.get $13 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14683,18 +14540,18 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $15 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $19 + local.get $15 i32.const 5 i32.const 2 i32.const 7 i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14712,28 +14569,28 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $20 + local.set $16 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $4 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $3 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $5 i32.const 4 i32.const 2 i32.const 3 @@ -14746,30 +14603,30 @@ local.set $8 i32.const 128 call $std/array/createReverseOrderedArray - local.set $10 + local.set $7 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $13 + local.set $9 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $16 + local.set $11 i32.const 512 call $std/array/createRandomOrderedArray - local.set $14 - local.get $20 + local.set $17 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $5 + local.get $4 i32.const 48 call $std/array/assertSorted - local.get $5 + local.get $4 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14781,17 +14638,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 48 call $std/array/assertSorted - local.get $1 + local.get $3 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14803,10 +14660,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $5 i32.const 48 call $std/array/assertSorted - local.get $6 + local.get $5 local.get $0 i32.const 0 call $std/array/isArraysEqual @@ -14835,10 +14692,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $7 i32.const 48 call $std/array/assertSorted - local.get $10 + local.get $7 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14851,10 +14708,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $9 i32.const 48 call $std/array/assertSorted - local.get $13 + local.get $9 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14867,10 +14724,10 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $11 i32.const 48 call $std/array/assertSorted - local.get $16 + local.get $11 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14883,82 +14740,233 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $17 i32.const 48 call $std/array/assertSorted - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $21 + local.get $1 call $~lib/rt/pure/__release - local.get $19 + local.get $14 call $~lib/rt/pure/__release - local.get $22 + local.get $13 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release - local.get $5 + local.get $15 call $~lib/rt/pure/__release - local.get $1 + local.get $21 call $~lib/rt/pure/__release - local.get $6 + local.get $16 + 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 $0 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $10 + local.get $7 call $~lib/rt/pure/__release - local.get $13 + local.get $9 call $~lib/rt/pure/__release - local.get $16 + local.get $11 call $~lib/rt/pure/__release - local.get $14 + local.get $17 call $~lib/rt/pure/__release - local.get $23 + local.get $22 call $~lib/rt/pure/__release - local.get $24 + local.get $23 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray 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 - call $std/array/createReverseOrderedNestedArray + i32.const 0 + local.set $1 + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $4 + i32.const 0 + i32.const 8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + 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 $4 local.tee $0 + local.get $2 + i32.load + local.tee $3 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $0 + i32.store + local.get $2 + local.get $4 + i32.store offset=4 + local.get $2 + i32.const 8 + i32.store offset=8 + local.get $2 + i32.const 2 + i32.store offset=12 + loop $for-loop|059 + local.get $1 + 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 $1 + i32.sub + call $~lib/array/Array#__set + local.get $2 + local.get $1 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|059 + end + end + local.get $2 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $2 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedElementsArray + i32.const 0 + local.set $1 + i32.const 2048 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $4 + i32.const 0 + i32.const 2048 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 14 + 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 $4 local.tee $0 + local.get $2 + i32.load + local.tee $3 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $0 + i32.store + local.get $2 + local.get $4 + i32.store offset=4 + local.get $2 + i32.const 2048 + i32.store offset=8 + local.get $2 + i32.const 512 + i32.store offset=12 + loop $for-loop|060 + local.get $1 + 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 $1 + i32.sub + i32.store + local.get $2 + local.get $1 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|060 + end + end + local.get $2 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $2 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14966,59 +14974,59 @@ i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $5 i32.const 7 i32.const 2 i32.const 15 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $8 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $1 - local.get $3 + local.set $4 + local.get $5 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 - local.set $2 + local.set $1 local.get $0 i32.load offset=12 - local.set $6 + local.set $7 loop $for-loop|03 - local.get $1 - local.get $6 + local.get $4 + local.get $7 i32.lt_s if - local.get $2 local.get $1 + local.get $4 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $5 - local.get $2 + local.tee $2 local.get $1 + local.get $4 call $~lib/array/Array#__get - local.tee $4 + local.tee $3 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $5 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> end - local.get $5 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $4 i32.const 1 i32.add - local.set $1 + local.set $4 br $for-loop|03 end end @@ -15037,53 +15045,53 @@ call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $1 + local.set $4 i32.const 0 - local.get $3 + local.get $5 i32.load offset=12 - local.tee $5 - local.get $7 + local.tee $2 + local.get $8 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $3 - local.get $7 + local.get $5 + local.get $8 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 - local.get $1 - local.get $5 + local.get $4 + local.get $2 i32.lt_s if - local.get $3 - local.get $1 + local.get $5 + local.get $4 call $~lib/array/Array#__get local.tee $0 - local.get $7 - local.get $1 + local.get $8 + local.get $4 call $~lib/array/Array#__get - local.tee $2 + local.tee $1 call $~lib/string/String.__eq i32.eqz if local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> 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 $4 i32.const 1 i32.add - local.set $1 + local.set $4 br $for-loop|04 end end @@ -15099,7 +15107,7 @@ unreachable end i32.const 0 - local.set $5 + local.set $4 i32.const 1600 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -15124,17 +15132,16 @@ i32.const 0 i32.store offset=12 local.get $0 - local.set $1 - local.get $0 + local.tee $1 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 $2 @@ -15150,24 +15157,22 @@ i32.const 400 i32.store offset=12 loop $for-loop|09 - local.get $5 + local.get $4 i32.const 400 i32.lt_s if - local.get $5 - local.set $1 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - local.set $8 + local.set $9 i32.const 0 - local.set $6 + local.set $7 i32.const 6064 local.set $0 loop $for-loop|01 - local.get $6 - local.get $8 + local.get $7 + local.get $9 i32.lt_s if block $__inlined_func$~lib/string/String#charAt (result i32) @@ -15179,7 +15184,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $5 + local.tee $1 i32.const 5088 call $~lib/string/String#get:length i32.ge_u @@ -15188,63 +15193,63 @@ i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $5 + local.tee $3 + local.get $1 i32.const 1 i32.shl i32.const 5088 i32.add i32.load16_u i32.store16 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain end - local.set $5 + local.set $1 local.get $0 - local.tee $4 + local.tee $3 local.get $0 - local.get $5 + local.get $1 call $~lib/string/String.__concat - local.tee $10 + local.tee $11 local.tee $0 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end - local.get $5 + local.get $1 call $~lib/rt/pure/__release - local.get $10 + local.get $11 call $~lib/rt/pure/__release - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 br $for-loop|01 end end local.get $2 - local.get $1 + local.get $4 local.get $0 call $~lib/array/Array<~lib/array/Array>#__set local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|09 end end local.get $2 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $3 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -15259,7 +15264,7 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $4 + local.tee $3 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15277,10 +15282,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.const 6064 call $~lib/array/Array#join - local.tee $7 + local.tee $8 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15298,10 +15303,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 i32.const 6512 call $~lib/array/Array#join - local.tee $8 + local.tee $9 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15319,7 +15324,7 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 i32.const 6576 call $~lib/array/Array#join local.tee $13 @@ -15340,12 +15345,12 @@ i32.const 6672 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 $16 + local.tee $15 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15363,10 +15368,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $19 + local.tee $17 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15384,22 +15389,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $2 i32.const 0 i32.store offset=4 - local.get $1 + local.get $2 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $4 call $~lib/array/Array#join - local.tee $20 + local.tee $18 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15417,7 +15422,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.load offset=4 local.tee $14 i32.const 0 @@ -15427,7 +15432,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $2 call $~lib/array/Array#join local.tee $14 i32.const 8176 @@ -15443,33 +15448,33 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $10 + local.get $7 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $11 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $16 + local.get $15 call $~lib/rt/pure/__release - local.get $18 + local.get $16 call $~lib/rt/pure/__release - local.get $19 + local.get $17 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $20 + local.get $18 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -15479,29 +15484,29 @@ i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 i32.const 1 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $3 i32.const 2 i32.const 2 i32.const 3 i32.const 8304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $5 i32.const 4 i32.const 2 i32.const 3 i32.const 8336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 - local.get $1 + local.set $8 + local.get $2 i32.const 6304 call $~lib/array/Array#join local.tee $0 @@ -15517,11 +15522,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $18 + local.set $16 local.get $0 i32.const 7984 call $~lib/string/String.__eq @@ -15534,11 +15539,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $19 + local.set $17 local.get $0 i32.const 8368 call $~lib/string/String.__eq @@ -15551,11 +15556,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $8 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $20 + local.set $18 local.get $0 i32.const 8400 call $~lib/string/String.__eq @@ -15574,9 +15579,9 @@ i32.const 8432 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 @@ -15599,13 +15604,13 @@ i32.const 8496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $9 i32.load offset=4 - local.get $8 + local.get $9 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $21 + local.set $20 local.get $0 i32.const 8528 call $~lib/string/String.__eq @@ -15624,13 +15629,13 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 i32.load offset=4 - local.get $10 + local.get $11 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $22 + local.set $21 local.get $0 i32.const 8624 call $~lib/string/String.__eq @@ -15655,7 +15660,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $23 + local.set $22 local.get $0 i32.const 8736 call $~lib/string/String.__eq @@ -15674,7 +15679,7 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $23 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 @@ -15722,7 +15727,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 @@ -15730,7 +15735,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 @@ -15743,9 +15748,9 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 + local.tee $1 local.set $32 - local.get $2 + local.get $1 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15763,9 +15768,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 $5 + local.tee $4 i32.const 2 i32.const 0 i32.const 6 @@ -15773,7 +15778,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $5 + local.get $4 i32.const 2 i32.const 0 i32.const 6 @@ -15781,14 +15786,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 $5 + local.tee $4 local.set $33 - local.get $5 + local.get $4 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15806,7 +15811,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 i32.load offset=4 i32.const 1 i32.const 2 @@ -15825,9 +15830,9 @@ i32.store local.get $29 i32.store - local.get $5 + local.get $4 i32.load offset=4 - local.get $5 + local.get $4 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $28 @@ -15844,38 +15849,38 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $7 + local.get $5 + call $~lib/rt/pure/__release + local.get $8 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $18 + local.get $16 call $~lib/rt/pure/__release - local.get $19 + local.get $17 call $~lib/rt/pure/__release - local.get $20 + local.get $18 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $8 + local.get $9 call $~lib/rt/pure/__release - local.get $21 + local.get $20 call $~lib/rt/pure/__release - local.get $10 + local.get $11 call $~lib/rt/pure/__release - local.get $22 + local.get $21 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $23 + local.get $22 call $~lib/rt/pure/__release - local.get $24 + local.get $23 call $~lib/rt/pure/__release local.get $26 call $~lib/rt/pure/__release @@ -15897,9 +15902,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 1 i32.const 2 i32.const 3 @@ -15907,7 +15912,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15915,7 +15920,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15923,7 +15928,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $1 + local.get $2 i32.const 3 i32.const 2 i32.const 3 @@ -15931,9 +15936,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $3 + local.get $5 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $7 + local.tee $8 i32.load offset=12 i32.const 10 i32.ne @@ -15950,7 +15955,7 @@ i32.const 10 i32.lt_s if - local.get $7 + local.get $8 local.get $12 call $~lib/array/Array#__get local.get $12 @@ -15976,9 +15981,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 1 i32.const 2 i32.const 15 @@ -15986,7 +15991,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 i32.const 3 i32.const 2 i32.const 15 @@ -15994,7 +15999,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $2 i32.const 3 i32.const 2 i32.const 15 @@ -16002,7 +16007,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $1 + local.get $2 i32.const 1 i32.const 2 i32.const 15 @@ -16010,17 +16015,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $6 + local.get $7 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $1 + local.set $2 i32.const 8 i32.const 2 i32.const 15 i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 - local.get $1 + local.set $3 + local.get $2 i32.load offset=12 i32.const 8 i32.ne @@ -16036,18 +16041,18 @@ local.set $12 loop $for-loop|2 local.get $12 - local.get $4 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $1 + local.get $2 local.get $12 call $~lib/array/Array#__get - local.tee $8 - local.get $4 + local.tee $9 + local.get $3 local.get $12 call $~lib/array/Array#__get - local.tee $10 + local.tee $11 call $~lib/string/String.__eq i32.eqz if @@ -16058,9 +16063,9 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $9 call $~lib/rt/pure/__release - local.get $10 + local.get $11 call $~lib/rt/pure/__release local.get $12 i32.const 1 @@ -16077,7 +16082,7 @@ call $~lib/rt/pure/__retain local.tee $12 i32.load offset=4 - local.tee $8 + local.tee $9 i32.const 0 i32.const 2 i32.const 3 @@ -16085,7 +16090,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $8 + local.get $9 i32.const 0 i32.const 2 i32.const 3 @@ -16095,7 +16100,7 @@ i32.store offset=4 local.get $12 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $8 + local.tee $9 i32.load offset=12 if i32.const 0 @@ -16107,31 +16112,31 @@ end local.get $12 call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $25 + local.get $6 + call $~lib/rt/pure/__release + local.get $24 call $~lib/rt/pure/__release - local.get $15 + local.get $10 call $~lib/rt/pure/__release local.get $30 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 $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $8 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index e7ad203e1f..70f36c4bbd 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -903,15 +903,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -919,14 +919,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -935,18 +935,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -957,18 +957,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -977,7 +977,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -985,9 +985,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -999,11 +999,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1013,25 +1013,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1702,9 +1702,10 @@ i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice + local.set $1 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.const 16 i32.sub i32.load offset=12 @@ -1722,10 +1723,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 @@ -1743,10 +1744,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 $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 16 i32.sub i32.load offset=12 @@ -1765,7 +1766,7 @@ i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.set $7 - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $7 i32.const 16 @@ -1834,14 +1835,13 @@ local.tee $1 i32.const 16 i32.sub + local.tee $0 i32.load offset=12 local.tee $5 i32.const 1073741808 i32.gt_u local.get $5 - local.get $1 - i32.const 16 - i32.sub + local.get $0 i32.load offset=12 i32.gt_u i32.or diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index f112291106..b0702c7965 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -911,15 +911,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -927,14 +927,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -943,18 +943,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -965,18 +965,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -985,7 +985,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -993,9 +993,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1007,11 +1007,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1021,25 +1021,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -3384,14 +3384,14 @@ end local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 16 i32.sub i32.load offset=12 - local.set $2 - local.get $3 - i32.const 0 + local.set $3 local.get $2 + i32.const 0 + local.get $3 call $~lib/dataview/DataView#constructor local.set $2 local.get $0 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 93499c11aa..54a79cc5fb 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -856,13 +856,12 @@ (local $1 f64) (local $2 i64) local.get $0 - local.tee $1 i64.reinterpret_f64 local.tee $2 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $0 + local.set $1 local.get $2 i64.const 52 i64.shr_u @@ -871,44 +870,42 @@ local.tee $2 i64.const 1049 i64.ge_u - if - local.get $0 + if (result f64) + local.get $1 call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - local.set $0 else local.get $2 i64.const 1024 i64.ge_u - if + if (result f64) f64.const 2 - local.get $0 + local.get $1 f64.mul f64.const 1 - local.get $0 - local.get $0 + local.get $1 + local.get $1 f64.mul f64.const 1 f64.add f64.sqrt - local.get $0 + local.get $1 f64.add f64.div f64.add call $~lib/math/NativeMath.log - local.set $0 else local.get $2 i64.const 997 i64.ge_u - if - local.get $0 - local.get $0 - local.get $0 + if (result f64) + local.get $1 + local.get $1 + local.get $1 f64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 f64.const 1 f64.add f64.sqrt @@ -917,12 +914,12 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - local.set $0 + else + local.get $1 end end end local.get $0 - local.get $1 f64.copysign ) (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) @@ -1156,10 +1153,9 @@ (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 @@ -1168,43 +1164,42 @@ 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 (param $0 f64) (param $1 f64) (result f64) @@ -5807,54 +5802,51 @@ (local $1 f32) (local $2 i32) local.get $0 - local.tee $1 i32.reinterpret_f32 i32.const 2147483647 i32.and local.tee $2 f32.reinterpret_i32 - local.set $0 + 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 $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 $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 @@ -5863,12 +5855,12 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $0 + else + local.get $1 end end end local.get $0 - local.get $1 f32.copysign ) (func $~lib/math/NativeMathf.atan (param $0 f32) (result f32) @@ -6074,50 +6066,48 @@ (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 (param $0 f32) (param $1 f32) (result f32) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cf89502f7c..59ea89c529 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))) @@ -930,9 +930,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -940,14 +940,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -956,18 +956,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -979,9 +979,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -998,7 +998,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1006,9 +1006,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1020,11 +1020,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1034,25 +1034,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1971,6 +1971,7 @@ i32.load local.set $3 call $~lib/rt/tlsf/maybeInitialize + local.set $6 local.get $3 i32.const 16 i32.sub @@ -2009,34 +2010,35 @@ call $~lib/builtins/abort unreachable end + local.get $5 + local.get $6 local.get $4 local.get $1 local.get $2 i32.shl - local.tee $2 + local.tee $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $1 - local.get $5 + local.tee $2 i32.add - local.get $2 + local.get $1 local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $1 + local.get $2 local.get $3 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 $2 + local.get $1 i32.store offset=8 end ) @@ -2088,118 +2090,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (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 $5 - local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 4 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_s - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 - ) (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -2603,9 +2493,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -2679,6 +2569,7 @@ end local.get $0 i32.load offset=8 + local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -2689,6 +2580,7 @@ local.get $5 i32.const 3 i32.shl + local.get $1 i32.add local.tee $1 local.get $3 @@ -2705,9 +2597,9 @@ local.get $1 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -3091,29 +2983,32 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) i32.const 24 i32.const 3 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -3124,7 +3019,7 @@ i32.const 100 i32.lt_s if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has if @@ -3135,7 +3030,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 24 @@ -3146,7 +3041,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3158,7 +3053,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3184,7 +3079,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3207,7 +3102,7 @@ i32.const 100 i32.lt_s if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3219,7 +3114,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3238,7 +3133,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 24 @@ -3249,7 +3144,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3261,7 +3156,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3287,7 +3182,7 @@ br $for-loop|3 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3299,20 +3194,120 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/map/Map#keys - local.set $4 - local.get $0 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 6 + i32.const 0 + local.set $1 + local.get $3 + i32.load offset=8 + local.set $8 + local.get $3 + i32.load offset=16 + local.tee $9 + local.tee $6 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $6 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $5 i32.const 0 i32.store - local.get $1 + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.tee $2 + local.get $5 + i32.load + local.tee $10 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $10 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $2 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $6 + i32.store offset=8 + local.get $5 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $9 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $5 + local.get $0 + local.get $2 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + local.get $5 + local.get $1 + call $~lib/array/Array#set:length + local.get $3 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 6 + call $~lib/rt/tlsf/__alloc + 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 @@ -3330,15 +3325,15 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $0 loop $for-loop|4 - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.ge_u if @@ -3349,18 +3344,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $4 + local.get $5 i32.load offset=4 i32.add i32.load8_s - local.set $3 + local.set $2 local.get $6 - local.get $2 + local.get $4 call $~lib/array/Array#__get local.set $7 - local.get $0 local.get $3 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3371,7 +3366,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -3386,22 +3381,22 @@ unreachable end local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|4 end end @@ -3417,7 +3412,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3430,9 +3425,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|6 - local.get $2 + local.get $4 i32.const 24 i32.shl i32.const 24 @@ -3440,8 +3435,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -3452,10 +3447,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#get - local.get $2 + local.get $4 i32.const 24 i32.shl i32.const 24 @@ -3471,11 +3466,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -3485,14 +3480,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|6 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -3505,9 +3500,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|8 - local.get $2 + local.get $4 i32.const 24 i32.shl i32.const 24 @@ -3515,8 +3510,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -3526,9 +3521,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 i32.const 24 i32.shl i32.const 24 @@ -3537,8 +3532,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -3549,11 +3544,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -3563,14 +3558,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|8 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -3582,9 +3577,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/map/Map#clear - local.get $0 + local.get $3 i32.load offset=20 if i32.const 0 @@ -3594,16 +3589,16 @@ 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 $1 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -3864,8 +3859,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3873,147 +3867,36 @@ (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 $6 + local.get $4 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $4 local.get $0 i32.load offset=8 - local.set $5 + local.tee $3 local.get $0 i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 9 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $7 - local.get $2 - i32.load8_u - call $~lib/array/Array#__set - local.get $7 - i32.const 1 - i32.add - local.set $7 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - local.get $7 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/map/Map#rehash (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 $6 - local.get $4 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $0 - i32.load offset=8 - local.tee $3 - local.get $0 - i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $8 - local.get $4 - local.set $5 - loop $while-continue|0 + i32.const 3 + i32.shl + i32.add + local.set $8 + local.get $4 + local.set $5 + loop $while-continue|0 local.get $3 local.get $8 i32.ne @@ -4123,9 +4006,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -4199,6 +4082,7 @@ end local.get $0 i32.load offset=8 + local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -4209,6 +4093,7 @@ local.get $5 i32.const 3 i32.shl + local.get $1 i32.add local.tee $1 local.get $3 @@ -4225,9 +4110,9 @@ local.get $1 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -4312,29 +4197,32 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) i32.const 24 i32.const 8 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -4343,7 +4231,7 @@ i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has if @@ -4354,7 +4242,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 255 @@ -4363,7 +4251,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4375,7 +4263,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4399,7 +4287,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4420,7 +4308,7 @@ i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4432,7 +4320,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4449,7 +4337,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 255 @@ -4458,7 +4346,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4470,7 +4358,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4494,7 +4382,7 @@ br $for-loop|3 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4506,10 +4394,110 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $1 + local.get $3 + i32.load offset=8 + local.set $8 + local.get $3 + i32.load offset=16 + local.tee $9 + local.tee $6 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $6 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 9 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 local.get $0 - call $~lib/map/Map#keys - local.set $4 + local.tee $2 + local.get $5 + i32.load + local.tee $10 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $10 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $2 + i32.store + local.get $5 local.get $0 + i32.store offset=4 + local.get $5 + local.get $6 + i32.store offset=8 + local.get $5 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $9 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $5 + local.get $0 + local.get $2 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + local.get $5 + local.get $1 + call $~lib/array/Array#set:length + local.get $3 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -4537,15 +4525,15 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $0 loop $for-loop|4 - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.ge_u if @@ -4556,18 +4544,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $4 + local.get $5 i32.load offset=4 i32.add i32.load8_u - local.set $3 + local.set $2 local.get $6 - local.get $2 + local.get $4 call $~lib/array/Array#__get local.set $7 - local.get $0 local.get $3 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4578,7 +4566,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -4593,22 +4581,22 @@ unreachable end local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|4 end end @@ -4624,7 +4612,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4637,16 +4625,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|6 - local.get $2 + local.get $4 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -4657,10 +4645,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#get - local.get $2 + local.get $4 i32.const 255 i32.and i32.const 20 @@ -4674,11 +4662,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -4688,14 +4676,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|6 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -4708,16 +4696,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|8 - local.get $2 + local.get $4 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -4727,17 +4715,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -4748,11 +4736,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -4762,14 +4750,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|8 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -4781,9 +4769,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/map/Map#clear - local.get $0 + local.get $3 i32.load offset=20 if i32.const 0 @@ -4793,16 +4781,16 @@ 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 $1 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/util/hash/hash16 (param $0 i32) (result i32) local.get $0 @@ -5177,123 +5165,6 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (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.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_s - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -5443,9 +5314,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -5519,6 +5390,7 @@ end local.get $0 i32.load offset=8 + local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -5529,6 +5401,7 @@ local.get $5 i32.const 3 i32.shl + local.get $1 i32.add local.tee $1 local.get $3 @@ -5545,9 +5418,9 @@ local.get $1 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -5634,29 +5507,33 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) i32.const 24 i32.const 11 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -5667,7 +5544,7 @@ i32.const 100 i32.lt_s if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has if @@ -5678,7 +5555,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 16 @@ -5689,7 +5566,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5701,7 +5578,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5727,7 +5604,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -5750,7 +5627,7 @@ i32.const 100 i32.lt_s if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5762,7 +5639,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5781,7 +5658,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 16 @@ -5792,7 +5669,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5804,7 +5681,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5830,7 +5707,7 @@ br $for-loop|3 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -5842,46 +5719,149 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/map/Map#keys - local.set $4 - local.get $0 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 13 - call $~lib/rt/tlsf/__alloc - 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.set $1 local.get $3 - i32.const 0 - i32.store offset=12 + i32.load offset=8 + local.set $9 local.get $3 - i32.const 0 - i32.store offset=16 + i32.load offset=16 + local.tee $10 + local.tee $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 1 + i32.shl + local.tee $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.tee $2 + local.get $5 + i32.load + local.tee $11 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $2 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $8 + i32.store offset=8 + local.get $5 + local.get $7 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $10 + i32.lt_s + if + local.get $9 + local.get $6 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $5 + local.get $0 + local.get $2 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $5 + local.get $1 + call $~lib/array/Array#set:length local.get $3 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 13 + call $~lib/rt/tlsf/__alloc + 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 $3 + local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $0 loop $for-loop|4 - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.ge_u if @@ -5892,20 +5872,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=4 - local.get $2 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_s - local.set $1 + local.set $2 local.get $6 - local.get $2 + local.get $4 call $~lib/array/Array#__get local.set $7 - local.get $0 - local.get $1 + local.get $3 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -5916,7 +5896,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -5930,27 +5910,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -5962,7 +5942,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5975,9 +5955,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|6 - local.get $2 + local.get $4 i32.const 16 i32.shl i32.const 16 @@ -5985,8 +5965,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -5997,10 +5977,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#get - local.get $2 + local.get $4 i32.const 16 i32.shl i32.const 16 @@ -6016,11 +5996,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -6030,14 +6010,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|6 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -6050,9 +6030,9 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|8 - local.get $2 + local.get $4 i32.const 16 i32.shl i32.const 16 @@ -6060,8 +6040,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -6071,9 +6051,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 i32.const 16 i32.shl i32.const 16 @@ -6082,8 +6062,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -6094,11 +6074,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -6108,14 +6088,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|8 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -6127,9 +6107,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/map/Map#clear - local.get $0 + local.get $3 i32.load offset=20 if i32.const 0 @@ -6139,16 +6119,16 @@ 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 $3 - call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6409,8 +6389,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6418,143 +6397,27 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $6 + local.get $4 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + 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.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 15 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load16_u - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/map/Map#rehash (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 $6 - local.get $4 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $0 - i32.load offset=8 - local.tee $3 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 @@ -6673,9 +6536,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -6749,6 +6612,7 @@ end local.get $0 i32.load offset=8 + local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -6759,6 +6623,7 @@ local.get $5 i32.const 3 i32.shl + local.get $1 i32.add local.tee $1 local.get $3 @@ -6775,9 +6640,9 @@ local.get $1 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -6862,29 +6727,33 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) i32.const 24 i32.const 14 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -6893,7 +6762,7 @@ i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has if @@ -6904,7 +6773,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 65535 @@ -6913,7 +6782,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -6925,7 +6794,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -6949,7 +6818,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -6970,7 +6839,7 @@ i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -6982,7 +6851,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -6999,7 +6868,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 65535 @@ -7008,7 +6877,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -7020,7 +6889,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -7044,7 +6913,7 @@ br $for-loop|3 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7056,70 +6925,173 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/map/Map#keys - local.set $4 - local.get $0 - call $~lib/map/Map#values - local.set $6 - i32.const 24 + i32.const 0 + local.set $1 + local.get $3 + i32.load offset=8 + local.set $9 + local.get $3 + i32.load offset=16 + local.tee $10 + local.tee $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 1 + i32.shl + local.tee $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $8 + call $~lib/memory/memory.fill i32.const 16 + i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.const 0 i32.store - local.get $3 + local.get $5 i32.const 0 i32.store offset=4 - local.get $3 + local.get $5 i32.const 0 i32.store offset=8 - local.get $3 + local.get $5 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 $5 - loop $for-loop|4 + local.get $0 + local.tee $2 + local.get $5 + i32.load + local.tee $11 + i32.ne + if local.get $2 - local.get $4 - i32.load offset=12 + call $~lib/rt/pure/__retain + local.set $2 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $2 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $8 + i32.store offset=8 + local.get $5 + local.get $7 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $10 i32.lt_s if - local.get $2 - local.get $4 - i32.load offset=12 - i32.ge_u - if - i32.const 1520 - i32.const 1472 - i32.const 104 + local.get $9 + local.get $6 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $5 + local.get $0 + local.get $2 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $5 + local.get $1 + call $~lib/array/Array#set:length + local.get $3 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 16 + call $~lib/rt/tlsf/__alloc + 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 + call $~lib/map/Map#constructor + local.set $0 + loop $for-loop|4 + local.get $4 + local.get $5 + i32.load offset=12 + i32.lt_s + if + local.get $4 + local.get $5 + i32.load offset=12 + i32.ge_u + if + i32.const 1520 + i32.const 1472 + i32.const 104 i32.const 42 call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=4 - local.get $2 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_u - local.set $1 + local.set $2 local.get $6 - local.get $2 + local.get $4 call $~lib/array/Array#__get local.set $7 - local.get $0 - local.get $1 + local.get $3 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7130,7 +7102,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -7144,27 +7116,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7176,7 +7148,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7189,16 +7161,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|6 - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -7209,10 +7181,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#get - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 20 @@ -7226,11 +7198,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -7240,14 +7212,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|6 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -7260,16 +7232,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|8 - local.get $2 + local.get $4 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -7279,17 +7251,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 i32.const 65535 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -7300,11 +7272,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -7314,14 +7286,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|8 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -7333,9 +7305,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/map/Map#clear - local.get $0 + local.get $3 i32.load offset=20 if i32.const 0 @@ -7345,16 +7317,16 @@ 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 $3 - call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7452,15 +7424,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/map/Map#constructor - local.set $0 + local.set $2 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -7470,15 +7443,15 @@ call $~lib/builtins/abort unreachable end + local.get $2 + 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 $2 local.get $0 - local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7489,10 +7462,10 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#get - local.get $1 + local.get $0 i32.const 10 i32.add i32.ne @@ -7504,14 +7477,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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -7524,14 +7497,14 @@ unreachable end i32.const 0 - 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 $2 local.get $0 - local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7542,10 +7515,10 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#get - local.get $1 + local.get $0 i32.const 10 i32.add i32.ne @@ -7557,15 +7530,15 @@ call $~lib/builtins/abort unreachable end + local.get $2 + 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 $2 local.get $0 - local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7576,10 +7549,10 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 - local.get $1 call $~lib/map/Map#get - local.get $1 + local.get $0 i32.const 20 i32.add i32.ne @@ -7591,14 +7564,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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -7610,39 +7583,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 - local.set $5 - local.get $0 + local.set $6 + local.get $2 i32.load offset=16 - local.tee $6 + local.tee $7 call $~lib/array/Array#constructor - local.set $1 + local.set $5 loop $for-loop|01 local.get $4 - local.get $6 + local.get $7 i32.lt_s if - local.get $5 local.get $4 i32.const 12 i32.mul + local.get $6 i32.add - local.tee $7 + local.tee $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if + local.get $0 + local.tee $1 + i32.const 1 + i32.add + local.set $0 + local.get $5 local.get $1 - local.get $3 - local.get $7 + local.get $8 i32.load call $~lib/array/Array#__set - local.get $3 - i32.const 1 - i32.add - local.set $3 end local.get $4 i32.const 1 @@ -7651,32 +7627,32 @@ br $for-loop|01 end end - local.get $1 - local.get $3 - call $~lib/array/Array#set:length + local.get $5 local.get $0 + call $~lib/array/Array#set:length + local.get $2 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $3 + local.set $0 call $~lib/map/Map#constructor - local.set $4 + local.set $1 loop $for-loop|2 - local.get $2 - local.get $1 + local.get $3 + local.get $5 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.set $5 + local.set $4 local.get $6 - local.get $2 + local.get $3 call $~lib/array/Array#__get local.set $7 - local.get $0 - local.get $5 + local.get $2 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -7687,7 +7663,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 local.get $7 i32.const 20 i32.sub @@ -7701,27 +7677,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $5 - local.get $5 + local.get $0 + local.get $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $1 local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7733,7 +7709,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7746,14 +7722,14 @@ unreachable end i32.const 0 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 i32.const 50 i32.lt_s if - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7764,10 +7740,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#get - local.get $2 + local.get $3 i32.const 20 i32.add i32.ne @@ -7779,11 +7755,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#delete - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7793,14 +7769,14 @@ 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|3 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -7813,14 +7789,14 @@ unreachable end i32.const 0 - local.set $2 + local.set $3 loop $for-loop|4 - local.get $2 + local.get $3 i32.const 50 i32.lt_s if - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7830,15 +7806,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 local.get $2 + local.get $3 + local.get $3 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7849,11 +7825,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#delete - local.get $0 local.get $2 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7863,14 +7839,14 @@ 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|4 end end - local.get $0 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -7882,9 +7858,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 + local.get $2 i32.load offset=20 if i32.const 0 @@ -7894,133 +7870,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#keys (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.tee $7 - local.set $6 - local.get $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 2 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 18 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 local.get $1 - i32.store - local.get $0 + call $~lib/rt/pure/__release local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 + call $~lib/rt/pure/__release ) (func $std/map/testNumeric (local $0 i32) @@ -8031,36 +7890,40 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) i32.const 24 i32.const 17 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 0 i32.store offset=4 - local.get $0 + local.get $3 i32.const 0 i32.store offset=8 - local.get $0 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 + local.get $3 i32.const 0 i32.store offset=16 - local.get $0 + local.get $3 i32.const 0 i32.store offset=20 - local.get $0 + local.get $3 call $~lib/map/Map#clear loop $for-loop|0 local.get $1 i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has if @@ -8071,14 +7934,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -8090,7 +7953,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -8112,7 +7975,7 @@ br $for-loop|0 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -8131,7 +7994,7 @@ i32.const 100 i32.lt_u if - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -8143,7 +8006,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -8158,14 +8021,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 local.get $1 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#has i32.eqz @@ -8177,7 +8040,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $1 call $~lib/map/Map#get local.get $1 @@ -8199,7 +8062,7 @@ br $for-loop|1 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -8211,15 +8074,118 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/map/Map#keys - local.set $4 - local.get $0 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 19 - call $~lib/rt/tlsf/__alloc + i32.const 0 + local.set $1 + local.get $3 + i32.load offset=8 + local.set $9 + local.get $3 + i32.load offset=16 + local.tee $10 + local.tee $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 2 + i32.shl + local.tee $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.tee $2 + local.get $5 + i32.load + local.tee $11 + i32.ne + if + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $2 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $8 + i32.store offset=8 + local.get $5 + local.get $7 + i32.store offset=12 + loop $for-loop|01 + local.get $6 + local.get $10 + i32.lt_s + if + local.get $9 + local.get $6 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + local.tee $0 + i32.const 1 + i32.add + local.set $1 + local.get $5 + local.get $0 + local.get $2 + i32.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end + local.get $5 + local.get $1 + call $~lib/array/Array#set:length + local.get $3 + 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 $1 i32.const 0 @@ -8242,23 +8208,23 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $0 loop $for-loop|2 - local.get $2 local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if + local.get $5 local.get $4 - local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $2 local.get $6 - local.get $2 + local.get $4 call $~lib/array/Array#__get local.set $7 - local.get $0 local.get $3 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8269,7 +8235,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -8284,22 +8250,22 @@ unreachable end local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|2 end end @@ -8315,7 +8281,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -8328,14 +8294,14 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|3 - local.get $2 + local.get $4 i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -8346,10 +8312,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#get - local.get $2 + local.get $4 i32.const 20 i32.add i32.ne @@ -8361,11 +8327,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -8375,14 +8341,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|3 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -8395,14 +8361,14 @@ unreachable end i32.const 0 - local.set $2 + local.set $4 loop $for-loop|4 - local.get $2 + local.get $4 i32.const 50 i32.lt_u if - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -8412,15 +8378,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -8431,11 +8397,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#delete - local.get $0 - local.get $2 + local.get $3 + local.get $4 call $~lib/map/Map#has if i32.const 0 @@ -8445,14 +8411,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -8464,9 +8430,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/map/Map#clear - local.get $0 + local.get $3 i32.load offset=20 if i32.const 0 @@ -8476,16 +8442,16 @@ 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 $1 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) @@ -8930,132 +8896,15 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $~lib/map/Map#values (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.tee $7 - local.set $6 - local.get $7 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 3 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 21 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $~lib/map/Map#values (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.set $3 + local.set $3 local.get $0 i32.load offset=16 local.tee $4 @@ -9297,9 +9146,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -9317,9 +9166,9 @@ if (result i32) i32.const 0 else - local.get $1 local.get $3 i64.load + local.get $1 i64.eq end br_if $__inlined_func$~lib/map/Map#find @@ -9371,6 +9220,7 @@ end local.get $0 i32.load offset=8 + local.set $3 local.get $0 local.get $0 i32.load offset=16 @@ -9381,6 +9231,7 @@ local.get $5 i32.const 24 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -9397,9 +9248,9 @@ local.get $3 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -9475,45 +9326,50 @@ end ) (func $std/map/testNumeric - (local $0 i64) + (local $0 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 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) i32.const 24 i32.const 20 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $4 i32.const 0 i32.store - local.get $1 + local.get $4 i32.const 0 i32.store offset=4 - local.get $1 + local.get $4 i32.const 0 i32.store offset=8 - local.get $1 + local.get $4 i32.const 0 i32.store offset=12 - local.get $1 + local.get $4 i32.const 0 i32.store offset=16 - local.get $1 + local.get $4 i32.const 0 i32.store offset=20 - local.get $1 + local.get $4 call $~lib/map/Map#clear loop $for-loop|0 - local.get $0 + local.get $3 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -9523,16 +9379,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -9543,10 +9399,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 10 i32.add @@ -9559,14 +9415,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -9579,14 +9435,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|1 - local.get $0 + local.get $3 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -9597,10 +9453,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 10 i32.add @@ -9613,16 +9469,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -9633,10 +9489,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 20 i32.add @@ -9649,14 +9505,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|1 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -9668,66 +9524,169 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/map/Map#keys - local.set $5 - local.get $1 - call $~lib/map/Map#values - local.set $7 - i32.const 24 - i32.const 22 + local.get $4 + i32.load offset=8 + local.set $11 + local.get $4 + i32.load offset=16 + local.tee $8 + local.set $9 + local.get $8 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $10 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 21 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 0 i32.store - local.get $2 + local.get $5 i32.const 0 i32.store offset=4 - local.get $2 + local.get $5 i32.const 0 i32.store offset=8 - local.get $2 + local.get $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 $6 - loop $for-loop|2 - local.get $3 - local.get $5 - i32.load offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $5 + i32.load + local.tee $12 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $12 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $10 + i32.store offset=8 + local.get $5 + local.get $9 + i32.store offset=12 + loop $for-loop|01 + local.get $6 + local.get $8 i32.lt_s if - local.get $5 - local.get $3 - call $~lib/array/Array#__get - local.set $0 - local.get $7 - local.get $3 - call $~lib/array/Array#__get - local.set $4 - local.get $1 - local.get $0 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 31 - i32.const 5 + local.get $11 + local.get $6 + i32.const 4 + i32.shl + i32.add + local.tee $1 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + local.get $1 + i64.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end + local.get $5 + local.get $2 + call $~lib/array/Array#set:length + local.get $4 + call $~lib/map/Map#values + local.set $2 + 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 + call $~lib/map/Map#constructor + local.set $1 + 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 $3 + local.get $2 + local.get $7 + call $~lib/array/Array#__get + local.set $6 + local.get $4 + local.get $3 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 31 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $1 local.get $4 + local.get $6 i32.const 20 i32.sub i64.extend_i32_s @@ -9741,27 +9700,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $0 local.get $0 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $1 local.get $6 - local.get $4 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $6 + local.get $6 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 - local.get $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -9773,7 +9732,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -9786,14 +9745,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|3 - local.get $0 + local.get $3 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -9804,10 +9763,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 20 i32.add @@ -9820,11 +9779,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -9834,14 +9793,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|3 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -9854,14 +9813,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|4 - local.get $0 + local.get $3 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -9871,16 +9830,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -9891,11 +9850,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -9905,14 +9864,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|4 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -9924,9 +9883,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 call $~lib/map/Map#clear - local.get $1 + local.get $4 i32.load offset=20 if i32.const 0 @@ -9938,172 +9897,60 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (param $0 i32) (result i32) + (func $std/map/testNumeric + (local $0 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 i32) (local $9 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 3 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 24 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $8 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $8 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $9 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $9 - i32.const 1 - i32.add - local.set $9 - end - local.get $8 - i32.const 1 - i32.add - local.set $8 - br $for-loop|0 - end - end - local.get $0 - local.get $9 - call $~lib/array/Array#set:length - local.get $0 - ) - (func $std/map/testNumeric - (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 $10 i32) + (local $11 i32) + (local $12 i32) i32.const 24 i32.const 23 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $4 i32.const 0 i32.store - local.get $1 + local.get $4 i32.const 0 i32.store offset=4 - local.get $1 + local.get $4 i32.const 0 i32.store offset=8 - local.get $1 + local.get $4 i32.const 0 i32.store offset=12 - local.get $1 + local.get $4 i32.const 0 i32.store offset=16 - local.get $1 + local.get $4 i32.const 0 i32.store offset=20 - local.get $1 + local.get $4 call $~lib/map/Map#clear loop $for-loop|0 - local.get $0 + local.get $3 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -10113,16 +9960,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10133,10 +9980,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 10 i32.add @@ -10149,14 +9996,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -10169,14 +10016,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|1 - local.get $0 + local.get $3 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10187,10 +10034,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 10 i32.add @@ -10203,16 +10050,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10223,10 +10070,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 20 i32.add @@ -10239,14 +10086,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|1 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -10258,54 +10105,157 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $11 + local.get $4 + i32.load offset=16 + local.tee $8 + local.set $9 + local.get $8 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $10 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 24 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $5 + i32.load + local.tee $12 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $12 + call $~lib/rt/pure/__release + end + local.get $5 local.get $1 - call $~lib/map/Map#keys - local.set $5 - local.get $1 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $10 + i32.store offset=8 + local.get $5 + local.get $9 + i32.store offset=12 + loop $for-loop|01 + local.get $6 + local.get $8 + i32.lt_s + if + local.get $11 + local.get $6 + i32.const 4 + i32.shl + i32.add + local.tee $1 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + local.get $1 + i64.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end + local.get $5 + local.get $2 + call $~lib/array/Array#set:length + local.get $4 call $~lib/map/Map#values - local.set $7 + local.set $2 i32.const 24 i32.const 25 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.const 0 i32.store - local.get $2 + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + local.get $0 i32.const 0 i32.store offset=8 - local.get $2 + local.get $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $0 i32.const 0 i32.store offset=16 - local.get $2 + local.get $0 i32.const 0 i32.store offset=20 - local.get $2 + local.get $0 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $6 + local.set $1 loop $for-loop|2 - local.get $3 + local.get $7 local.get $5 i32.load offset=12 i32.lt_s if local.get $5 - local.get $3 + local.get $7 call $~lib/array/Array#__get - local.set $0 + local.set $3 + local.get $2 local.get $7 - local.get $3 call $~lib/array/Array#__get - local.set $4 - local.get $1 - local.get $0 + local.set $6 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10316,8 +10266,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $4 + local.get $6 i32.const 20 i32.sub i64.extend_i32_s @@ -10331,27 +10281,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $0 local.get $0 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $1 local.get $6 - local.get $4 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $6 + local.get $6 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 - local.get $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -10363,7 +10313,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -10376,14 +10326,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|3 - local.get $0 + local.get $3 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10394,10 +10344,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#get - local.get $0 + local.get $3 i32.wrap_i64 i32.const 20 i32.add @@ -10410,11 +10360,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -10424,14 +10374,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|3 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -10444,14 +10394,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|4 - local.get $0 + local.get $3 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -10461,16 +10411,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 - local.get $0 + local.get $4 + local.get $3 + local.get $3 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -10481,11 +10431,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -10495,14 +10445,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|4 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -10514,9 +10464,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 call $~lib/map/Map#clear - local.get $1 + local.get $4 i32.load offset=20 if i32.const 0 @@ -10528,14 +10478,14 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 @@ -10838,22 +10788,22 @@ (func $~lib/map/Map#keys (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) (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 f32) local.get $0 i32.load offset=8 - local.set $5 + local.set $8 local.get $0 i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 + local.tee $5 + local.set $6 + local.get $5 i32.const 268435452 i32.gt_u if @@ -10864,14 +10814,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $6 i32.const 2 i32.shl - local.tee $6 + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + local.tee $1 + local.get $7 call $~lib/memory/memory.fill i32.const 16 i32.const 27 @@ -10889,39 +10839,39 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load - local.tee $4 + local.tee $9 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $9 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 $6 + local.get $7 i32.store offset=8 local.get $0 - local.get $7 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $4 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $8 + local.get $4 i32.const 12 i32.mul i32.add @@ -10931,15 +10881,20 @@ i32.and i32.eqz if + local.get $3 + local.tee $1 + i32.const 1 + i32.add + local.set $3 local.get $2 f32.load - local.set $3 - local.get $10 + local.set $10 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -10951,7 +10906,7 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add local.tee $2 @@ -10963,26 +10918,22 @@ end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 2 i32.shl i32.add - local.get $3 - f32.store local.get $10 - i32.const 1 - i32.add - local.set $10 + f32.store end - local.get $9 + local.get $4 i32.const 1 i32.add - local.set $9 + local.set $4 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $3 call $~lib/array/Array#set:length local.get $0 ) @@ -12064,22 +12015,22 @@ (func $~lib/map/Map#keys (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 $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) + (local $10 f64) local.get $0 i32.load offset=8 - local.set $5 + local.set $8 local.get $0 i32.load offset=16 - local.tee $8 - local.set $7 - local.get $8 + local.tee $5 + local.set $6 + local.get $5 i32.const 134217726 i32.gt_u if @@ -12090,14 +12041,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $6 i32.const 3 i32.shl - local.tee $6 + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $6 + local.tee $1 + local.get $7 call $~lib/memory/memory.fill i32.const 16 i32.const 30 @@ -12115,39 +12066,39 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load - local.tee $4 + local.tee $9 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $2 + local.get $9 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 $6 + local.get $7 i32.store offset=8 local.get $0 - local.get $7 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $9 - local.get $8 + local.get $4 + local.get $5 i32.lt_s if - local.get $5 - local.get $9 + local.get $8 + local.get $4 i32.const 4 i32.shl i32.add @@ -12157,15 +12108,20 @@ i32.and i32.eqz if + local.get $3 + local.tee $1 + i32.const 1 + i32.add + local.set $3 local.get $2 f64.load - local.set $3 - local.get $10 + local.set $10 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u if - local.get $10 + local.get $1 i32.const 0 i32.lt_s if @@ -12177,7 +12133,7 @@ unreachable end local.get $0 - local.get $10 + local.get $1 i32.const 1 i32.add local.tee $2 @@ -12189,26 +12145,22 @@ end local.get $0 i32.load offset=4 - local.get $10 + local.get $1 i32.const 3 i32.shl i32.add - local.get $3 - f64.store local.get $10 - i32.const 1 - i32.add - local.set $10 + f64.store end - local.get $9 + local.get $4 i32.const 1 i32.add - local.set $9 + local.set $4 br $for-loop|0 end end local.get $0 - local.get $10 + local.get $3 call $~lib/array/Array#set:length local.get $0 ) @@ -12358,9 +12310,9 @@ local.set $4 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl @@ -12432,6 +12384,7 @@ end local.get $0 i32.load offset=8 + local.set $3 local.get $0 local.get $0 i32.load offset=16 @@ -12442,6 +12395,7 @@ local.get $5 i32.const 24 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -12458,9 +12412,9 @@ local.get $3 local.get $0 i32.load - local.get $4 local.get $0 i32.load offset=4 + local.get $4 i32.and i32.const 2 i32.shl diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 51f891ee93..c0025677b3 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1874,13 +1874,12 @@ (local $3 f64) (local $4 i64) local.get $0 - local.tee $3 i64.reinterpret_f64 local.tee $4 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $0 + local.set $3 local.get $4 i64.const 52 i64.shr_u @@ -1890,43 +1889,43 @@ i64.const 1049 i64.ge_u if - local.get $0 + local.get $3 call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - local.set $0 + local.set $3 else local.get $4 i64.const 1024 i64.ge_u if f64.const 2 - local.get $0 + local.get $3 f64.mul f64.const 1 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul f64.const 1 f64.add f64.sqrt - local.get $0 + local.get $3 f64.add f64.div f64.add call $~lib/math/NativeMath.log - local.set $0 + local.set $3 else local.get $4 i64.const 997 i64.ge_u if - local.get $0 - local.get $0 - local.get $0 + local.get $3 + local.get $3 + local.get $3 f64.mul - local.tee $0 - local.get $0 + local.tee $3 + local.get $3 f64.const 1 f64.add f64.sqrt @@ -1935,18 +1934,18 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - local.set $0 + local.set $3 end end end - local.get $0 local.get $3 + local.get $0 f64.copysign local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $3 + local.get $0 call $~lib/bindings/Math/asinh local.get $1 local.get $2 @@ -1959,54 +1958,53 @@ (local $3 f32) (local $4 i32) local.get $0 - local.tee $3 i32.reinterpret_f32 i32.const 2147483647 i32.and local.tee $4 f32.reinterpret_i32 - local.set $0 + local.set $3 local.get $4 i32.const 1166016512 i32.ge_u if - local.get $0 + local.get $3 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - local.set $0 + local.set $3 else local.get $4 i32.const 1073741824 i32.ge_u if f32.const 2 - local.get $0 + local.get $3 f32.mul f32.const 1 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f32.mul f32.const 1 f32.add f32.sqrt - local.get $0 + local.get $3 f32.add f32.div f32.add call $~lib/math/NativeMathf.log - local.set $0 + local.set $3 else local.get $4 i32.const 964689920 i32.ge_u if - local.get $0 - local.get $0 - local.get $0 + local.get $3 + local.get $3 + local.get $3 f32.mul - local.tee $0 - local.get $0 + local.tee $3 + local.get $3 f32.const 1 f32.add f32.sqrt @@ -2015,12 +2013,12 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $0 + local.set $3 end end end - local.get $0 local.get $3 + local.get $0 f32.copysign local.get $1 local.get $2 @@ -2471,10 +2469,9 @@ (local $4 i64) (local $5 f64) local.get $0 - local.tee $3 f64.abs - local.set $0 - local.get $3 + local.set $3 + local.get $0 i64.reinterpret_f64 i64.const 52 i64.shr_u @@ -2490,42 +2487,42 @@ if f64.const 0.5 f64.const 2 - local.get $0 + local.get $3 f64.mul local.tee $5 local.get $5 - local.get $0 + local.get $3 f64.mul f64.const 1 - local.get $0 + local.get $3 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - local.set $0 + local.set $3 end else f64.const 0.5 f64.const 2 - local.get $0 + local.get $3 f64.const 1 - local.get $0 + local.get $3 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul - local.set $0 + local.set $3 end - local.get $0 local.get $3 + local.get $0 f64.copysign 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 @@ -2538,10 +2535,9 @@ (local $3 f32) (local $4 i32) local.get $0 - local.tee $3 f32.abs - local.set $0 - local.get $3 + local.set $3 + local.get $0 i32.reinterpret_f32 local.tee $4 i32.const 1056964608 @@ -2553,35 +2549,35 @@ if f32.const 0.5 f32.const 2 - local.get $0 + local.get $3 f32.mul f32.const 1 - local.get $0 + local.get $3 f32.const 1 - local.get $0 + local.get $3 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 + local.set $3 end else f32.const 0.5 f32.const 2 - local.get $0 + local.get $3 f32.const 1 - local.get $0 + local.get $3 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 + local.set $3 end - local.get $0 local.get $3 + local.get $0 f32.copysign local.get $1 local.get $2 @@ -11230,8 +11226,6 @@ (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 @@ -38350,17 +38344,17 @@ 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 + local.get $3 i64.xor local.tee $3 local.get $3 i64.const 17 i64.shr_u i64.xor + local.get $4 i64.xor local.get $4 i64.const 26 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 6139deaace..1ccbff7645 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,6 @@ (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_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))) @@ -151,16 +151,16 @@ local.set $1 local.get $2 if - local.get $3 + local.get $0 i32.load16_u local.tee $2 - local.get $0 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $2 + local.get $4 i32.sub return end @@ -177,7 +177,7 @@ end i32.const 0 ) - (func $~start + (func $start:std/object-literal (local $0 i32) (local $1 i32) i32.const 1136 @@ -207,7 +207,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 1040 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -215,18 +215,18 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $1 + local.get $0 select br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/string/String#get:length - local.tee $0 + local.tee $1 i32.const 1040 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 @@ -279,4 +279,7 @@ unreachable end ) + (func $~start + call $start:std/object-literal + ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 6d1b020b39..9474608b1a 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -2075,11 +2075,13 @@ global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 + local.set $1 + local.get $0 i32.load if (result i32) i32.const 0 else - local.get $0 + local.get $1 i32.load offset=4 i32.eqz end diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 28130fa71a..c19a897f7d 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -224,8 +224,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/two global.get $std/pointer/one + global.get $std/pointer/two i32.add global.set $std/pointer/add global.get $std/pointer/add diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index e895d0b7da..2dca78a90b 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))) @@ -927,9 +927,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -937,14 +937,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -953,18 +953,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -976,9 +976,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -995,7 +995,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1003,9 +1003,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1017,11 +1017,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1031,25 +1031,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1962,6 +1962,7 @@ i32.load local.set $3 call $~lib/rt/tlsf/maybeInitialize + local.set $6 local.get $3 i32.const 16 i32.sub @@ -2000,34 +2001,35 @@ call $~lib/builtins/abort unreachable end + local.get $5 + local.get $6 local.get $4 local.get $1 local.get $2 i32.shl - local.tee $2 + local.tee $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $1 - local.get $5 + local.tee $2 i32.add - local.get $2 + local.get $1 local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $1 + local.get $2 local.get $3 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 $2 + local.get $1 i32.store offset=8 end ) @@ -2067,115 +2069,6 @@ local.get $2 i32.store8 ) - (func $~lib/set/Set#values (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 $5 - local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 4 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $6 - local.get $2 - i32.load8_s - call $~lib/array/Array#__set - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - local.get $0 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2263,10 +2156,17 @@ (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/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 24 i32.shl i32.const 24 @@ -2274,8 +2174,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -2285,12 +2185,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -2301,14 +2201,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -2321,9 +2221,9 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 i32.const 24 i32.shl i32.const 24 @@ -2331,8 +2231,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -2343,12 +2243,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -2359,14 +2259,14 @@ 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|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -2378,48 +2278,144 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor - local.set $3 - loop $for-loop|4 - local.get $1 - local.get $2 - i32.load offset=12 - i32.lt_s - if - local.get $0 - local.get $2 - local.get $1 - call $~lib/array/Array#__get - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 24 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $2 - local.get $1 - call $~lib/array/Array#__get - call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|4 - end - end + local.get $4 + i32.load offset=8 + local.set $8 + local.get $4 + i32.load offset=16 + local.tee $9 + local.tee $6 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $6 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $3 + i32.const 0 + i32.store local.get $3 - i32.load offset=20 + 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 $0 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $10 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $10 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 + local.get $0 + i32.store offset=4 + local.get $3 + local.get $6 + i32.store offset=8 + local.get $3 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $9 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $0 + loop $for-loop|4 + local.get $5 + local.get $3 + i32.load offset=12 + i32.lt_s + if + local.get $4 + local.get $3 + local.get $5 + call $~lib/array/Array#__get + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $3 + local.get $5 + call $~lib/array/Array#__get + call $~lib/set/Set#add + call $~lib/rt/pure/__release + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|4 + end + end local.get $0 i32.load offset=20 + local.get $4 + i32.load offset=20 i32.ne if i32.const 0 @@ -2430,9 +2426,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|6 - local.get $1 + local.get $5 i32.const 24 i32.shl i32.const 24 @@ -2440,8 +2436,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -2452,11 +2448,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -2466,14 +2462,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|6 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -2486,9 +2482,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|8 - local.get $1 + local.get $5 i32.const 24 i32.shl i32.const 24 @@ -2496,8 +2492,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -2507,12 +2503,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -2523,11 +2519,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -2537,14 +2533,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|8 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -2556,9 +2552,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -2568,12 +2564,12 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -2830,130 +2826,21 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (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 $5 + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=16 - local.tee $4 - local.tee $8 - i32.const 1073741808 - i32.gt_u + i32.load offset=12 + i32.ge_u if - i32.const 1200 + i32.const 1408 i32.const 1360 - i32.const 57 - i32.const 60 + i32.const 104 + i32.const 42 call $~lib/builtins/abort unreachable end - local.get $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $8 - i32.store offset=8 - local.get $0 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $4 - i32.lt_s - if - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $6 - local.get $2 - i32.load8_u - call $~lib/array/Array#__set - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - local.get $0 - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 1408 - i32.const 1360 - i32.const 104 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + i32.load offset=4 local.get $1 i32.add i32.load8_u @@ -3024,17 +2911,24 @@ (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/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -3044,12 +2938,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3060,14 +2954,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3080,16 +2974,16 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3100,12 +2994,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3116,14 +3010,14 @@ 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|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3135,20 +3029,116 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $8 + local.get $4 + i32.load offset=16 + local.tee $9 + local.tee $6 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $6 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/__alloc + 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 $0 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $10 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $10 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 local.get $0 - call $~lib/set/Set#values - local.set $2 + i32.store offset=4 + local.get $3 + local.get $6 + i32.store offset=8 + local.get $3 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $9 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|4 - local.get $1 - local.get $2 + local.get $5 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $2 - local.get $1 + local.get $4 + local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3160,23 +3150,23 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - local.get $2 - local.get $1 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|4 end end - local.get $3 - i32.load offset=20 local.get $0 i32.load offset=20 + local.get $4 + i32.load offset=20 i32.ne if i32.const 0 @@ -3187,16 +3177,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|6 - local.get $1 + local.get $5 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -3207,11 +3197,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -3221,14 +3211,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|6 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -3241,16 +3231,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|8 - local.get $1 + local.get $5 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -3260,12 +3250,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -3276,11 +3266,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -3290,14 +3280,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|8 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -3309,9 +3299,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -3321,12 +3311,12 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -3683,120 +3673,6 @@ local.get $2 i32.store16 ) - (func $~lib/set/Set#values (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.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 1 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i32.load16_s - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - local.get $0 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -3886,10 +3762,18 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -3897,8 +3781,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -3908,12 +3792,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3924,14 +3808,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3944,9 +3828,9 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -3954,8 +3838,8 @@ i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3966,12 +3850,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3982,14 +3866,14 @@ 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|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4001,70 +3885,170 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor - local.set $3 - loop $for-loop|4 - local.get $1 - local.get $2 - i32.load offset=12 - i32.lt_s - if - local.get $0 - local.get $2 - local.get $1 - call $~lib/array/Array#__get - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 24 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - local.get $2 - local.get $1 - call $~lib/array/Array#__get - call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|4 - end - end - local.get $3 - i32.load offset=20 - local.get $0 - i32.load offset=20 - i32.ne + local.get $4 + i32.load offset=8 + local.set $10 + local.get $4 + i32.load offset=16 + local.tee $7 + local.set $8 + local.get $7 + i32.const 536870904 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 27 - i32.const 3 + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 call $~lib/builtins/abort unreachable end + local.get $8 + i32.const 1 + i32.shl + local.tee $9 i32.const 0 - local.set $1 - loop $for-loop|6 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 50 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $9 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 8 + call $~lib/rt/tlsf/__alloc + 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 $0 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $11 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 + local.get $0 + i32.store offset=4 + local.get $3 + local.get $9 + i32.store offset=8 + local.get $3 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $7 + i32.lt_s + if + local.get $10 + local.get $6 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $0 + loop $for-loop|4 + local.get $5 + local.get $3 + i32.load offset=12 i32.lt_s if + local.get $4 + local.get $3 + local.get $5 + call $~lib/array/Array#__get + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 24 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 + local.get $3 + local.get $5 + call $~lib/array/Array#__get + call $~lib/set/Set#add + call $~lib/rt/pure/__release + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|4 + end + end + local.get $0 + i32.load offset=20 + local.get $4 + i32.load offset=20 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $5 + loop $for-loop|6 + local.get $5 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 50 + i32.lt_s + if + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -4075,11 +4059,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4089,14 +4073,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|6 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -4109,9 +4093,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|8 - local.get $1 + local.get $5 i32.const 16 i32.shl i32.const 16 @@ -4119,8 +4103,8 @@ i32.const 50 i32.lt_s if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4130,12 +4114,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -4146,11 +4130,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4160,14 +4144,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|8 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -4179,9 +4163,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -4191,12 +4175,12 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -4453,160 +4437,46 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (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 + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 536870904 - i32.gt_u + i32.load offset=12 + i32.ge_u if - i32.const 1200 + i32.const 1408 i32.const 1360 - i32.const 57 - i32.const 60 + i32.const 104 + i32.const 42 call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 + i32.load offset=4 + local.get $1 i32.const 1 i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.store + i32.add + i32.load16_u + ) + (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) + (local $2 i32) 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.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i32.load16_u - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - local.get $0 - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 1408 - i32.const 1360 - i32.const 104 - i32.const 42 - 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/set/Set#delete (param $0 i32) (param $1 i32) - (local $2 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 - local.tee $1 - i32.eqz - if - return - end - local.get $1 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.or + local.get $1 + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find + local.tee $1 + i32.eqz + if + return + end + local.get $1 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.or i32.store offset=4 local.get $0 local.get $0 @@ -4654,17 +4524,25 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4674,12 +4552,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4690,14 +4568,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4710,16 +4588,16 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|3 - local.get $2 + local.get $3 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4730,12 +4608,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4746,14 +4624,14 @@ 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|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4765,20 +4643,120 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $10 + local.get $4 + i32.load offset=16 + local.tee $7 + local.set $8 + local.get $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 1 + i32.shl + local.tee $9 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $9 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 10 + call $~lib/rt/tlsf/__alloc + 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 $0 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $11 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 local.get $0 - call $~lib/set/Set#values - local.set $2 + i32.store offset=4 + local.get $3 + local.get $9 + i32.store offset=8 + local.get $3 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $7 + i32.lt_s + if + local.get $10 + local.get $6 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|4 - local.get $1 - local.get $2 + local.get $5 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $2 - local.get $1 + local.get $4 + local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4790,23 +4768,23 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - local.get $2 - local.get $1 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|4 end end - local.get $3 - i32.load offset=20 local.get $0 i32.load offset=20 + local.get $4 + i32.load offset=20 i32.ne if i32.const 0 @@ -4817,16 +4795,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|6 - local.get $1 + local.get $5 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -4837,11 +4815,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4851,14 +4829,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|6 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -4871,16 +4849,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|8 - local.get $1 + local.get $5 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4890,12 +4868,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -4906,11 +4884,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -4920,14 +4898,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|8 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -4939,9 +4917,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -4951,12 +4929,12 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -5319,120 +5297,6 @@ local.get $2 i32.store ) - (func $~lib/set/Set#values (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.tee $7 - local.set $6 - local.get $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 2 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - local.get $0 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -5518,15 +5382,23 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|0 - local.get $2 + local.get $3 i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5536,12 +5408,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5552,14 +5424,14 @@ 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|0 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -5572,14 +5444,14 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 100 i32.lt_s if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5590,12 +5462,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5606,14 +5478,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -5625,20 +5497,120 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $10 + local.get $4 + i32.load offset=16 + local.tee $7 + local.set $8 + local.get $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 2 + i32.shl + local.tee $9 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $9 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + 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 $0 - call $~lib/set/Set#values - local.set $2 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $11 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 + local.get $0 + i32.store offset=4 + local.get $3 + local.get $9 + i32.store offset=8 + local.get $3 + local.get $8 + i32.store offset=12 + loop $for-loop|01 + local.get $6 + local.get $7 + i32.lt_s + if + local.get $10 + local.get $6 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|2 - local.get $1 - local.get $2 + local.get $5 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $2 - local.get $1 + local.get $4 + local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5650,23 +5622,23 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - local.get $2 - local.get $1 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|2 end end - local.get $3 - i32.load offset=20 local.get $0 i32.load offset=20 + local.get $4 + i32.load offset=20 i32.ne if i32.const 0 @@ -5677,14 +5649,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|3 - local.get $1 + local.get $5 i32.const 50 i32.lt_s if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -5695,11 +5667,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -5709,14 +5681,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -5729,14 +5701,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|4 - local.get $1 + local.get $5 i32.const 50 i32.lt_s if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -5746,12 +5718,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -5762,11 +5734,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -5776,14 +5748,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|4 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -5795,9 +5767,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -5807,80 +5779,17 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (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/set/Set#clear - local.get $0 - ) - (func $~lib/set/Set#values (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.tee $7 - local.set $6 - local.get $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 2 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 14 + i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 @@ -5895,65 +5804,14 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store local.get $0 - local.get $2 - i32.store offset=4 + i32.const 0 + i32.store offset=16 local.get $0 - local.get $5 - i32.store offset=8 + i32.const 0 + i32.store offset=20 local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i32.load - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end + call $~lib/set/Set#clear local.get $0 ) (func $std/set/testNumeric @@ -5961,15 +5819,23 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|0 - local.get $2 + local.get $3 i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5979,12 +5845,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5995,14 +5861,14 @@ 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|0 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6015,14 +5881,14 @@ unreachable end i32.const 50 - local.set $2 + local.set $3 loop $for-loop|1 - local.get $2 + local.get $3 i32.const 100 i32.lt_u if - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -6033,12 +5899,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $2 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -6049,14 +5915,14 @@ 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 $0 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6068,20 +5934,120 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $10 + local.get $4 + i32.load offset=16 + local.tee $7 + local.set $8 + local.get $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 2 + i32.shl + local.tee $9 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $9 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + 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 $0 + local.set $1 + local.get $0 + local.get $3 + i32.load + local.tee $11 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $11 + call $~lib/rt/pure/__release + end + local.get $3 + local.get $1 + i32.store + local.get $3 local.get $0 - call $~lib/set/Set#values - local.set $2 + i32.store offset=4 + local.get $3 + local.get $9 + i32.store offset=8 + local.get $3 + local.get $8 + i32.store offset=12 + loop $for-loop|01 + local.get $6 + local.get $7 + i32.lt_s + if + local.get $10 + local.get $6 + i32.const 3 + i32.shl + i32.add + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $3 + local.get $0 + local.get $1 + i32.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|01 + end + end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|2 - local.get $1 - local.get $2 + local.get $5 + local.get $3 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $2 - local.get $1 + local.get $4 + local.get $3 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6093,23 +6059,23 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $3 - local.get $2 - local.get $1 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|2 end end - local.get $3 - i32.load offset=20 local.get $0 i32.load offset=20 + local.get $4 + i32.load offset=20 i32.ne if i32.const 0 @@ -6120,14 +6086,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|3 - local.get $1 + local.get $5 i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -6138,11 +6104,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -6152,14 +6118,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|3 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -6172,14 +6138,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $5 loop $for-loop|4 - local.get $1 + local.get $5 i32.const 50 i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -6189,12 +6155,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has i32.eqz if @@ -6205,11 +6171,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#delete - local.get $0 - local.get $1 + local.get $4 + local.get $5 call $~lib/set/Set#has if i32.const 0 @@ -6219,14 +6185,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $5 i32.const 1 i32.add - local.set $1 + local.set $5 br $for-loop|4 end end - local.get $0 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -6238,9 +6204,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/set/Set#clear - local.get $0 + local.get $4 i32.load offset=20 if i32.const 0 @@ -6250,12 +6216,12 @@ 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 $4 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) @@ -6686,120 +6652,6 @@ local.get $2 i64.store ) - (func $~lib/set/Set#values (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.tee $7 - local.set $6 - local.get $7 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 3 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - local.get $0 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 @@ -6882,20 +6734,28 @@ end ) (func $std/set/testNumeric - (local $0 i64) + (local $0 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 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $4 loop $for-loop|0 - local.get $0 + local.get $3 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -6905,12 +6765,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -6921,14 +6781,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6941,14 +6801,14 @@ unreachable end i64.const 50 - local.set $0 + local.set $3 loop $for-loop|1 - local.get $0 + local.get $3 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -6959,55 +6819,155 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if - i32.const 0 - i32.const 1312 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 0 + i32.const 1312 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i64.const 1 + i64.add + local.set $3 + br $for-loop|1 + end + end + local.get $4 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + local.set $11 + local.get $4 + i32.load offset=16 + local.tee $8 + local.set $9 + local.get $8 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $10 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $5 + i32.load + local.tee $12 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $12 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $10 + i32.store offset=8 + local.get $5 + local.get $9 + i32.store offset=12 + loop $for-loop|01 + local.get $7 + local.get $8 + i32.lt_s + if + local.get $11 + local.get $7 + i32.const 4 + i32.shl + i32.add + local.tee $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + local.get $1 + i64.load + call $~lib/array/Array#__set end - local.get $0 - i64.const 1 - i64.add - local.set $0 - br $for-loop|1 + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|01 end end - local.get $1 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/set/Set#values - local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|2 - local.get $3 - local.get $2 + local.get $6 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $1 - local.get $2 - local.get $3 + local.get $4 + local.get $5 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7019,22 +6979,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 - local.get $3 + local.get $0 + local.get $5 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|2 end end - local.get $4 + local.get $0 i32.load offset=20 - local.get $1 + local.get $4 i32.load offset=20 i32.ne if @@ -7046,14 +7006,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|3 - local.get $0 + local.get $3 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7064,11 +7024,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7078,14 +7038,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|3 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -7098,14 +7058,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|4 - local.get $0 + local.get $3 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7115,12 +7075,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7131,11 +7091,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7145,14 +7105,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|4 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -7164,9 +7124,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 call $~lib/set/Set#clear - local.get $1 + local.get $4 i32.load offset=20 if i32.const 0 @@ -7176,11 +7136,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) @@ -7211,135 +7171,29 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (param $0 i32) (result i32) + (func $std/set/testNumeric + (local $0 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 i32) - (local $9 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.tee $7 - local.set $6 - local.get $7 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 3 - i32.shl - local.tee $5 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $5 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 18 - 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 $2 - local.set $1 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $5 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $9 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $9 - i32.const 4 - i32.shl - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $8 - local.get $2 - i64.load - call $~lib/array/Array#__set - local.get $8 - i32.const 1 - i32.add - local.set $8 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - local.get $0 - ) - (func $std/set/testNumeric - (local $0 i64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $4 loop $for-loop|0 - local.get $0 + local.get $3 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7349,12 +7203,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7365,14 +7219,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7385,14 +7239,14 @@ unreachable end i64.const 50 - local.set $0 + local.set $3 loop $for-loop|1 - local.get $0 + local.get $3 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7403,12 +7257,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7419,14 +7273,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|1 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7438,20 +7292,120 @@ call $~lib/builtins/abort unreachable end + local.get $4 + i32.load offset=8 + local.set $11 + local.get $4 + i32.load offset=16 + local.tee $8 + local.set $9 + local.get $8 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $9 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $10 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $0 + local.set $1 + local.get $0 + local.get $5 + i32.load + local.tee $12 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $12 + call $~lib/rt/pure/__release + end + local.get $5 local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + local.get $10 + i32.store offset=8 + local.get $5 + local.get $9 + i32.store offset=12 + loop $for-loop|01 + local.get $7 + local.get $8 + i32.lt_s + if + local.get $11 + local.get $7 + i32.const 4 + i32.shl + i32.add + local.tee $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + local.get $1 + i64.load + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|01 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|2 - local.get $3 - local.get $2 + local.get $6 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $1 - local.get $2 - local.get $3 + local.get $4 + local.get $5 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7463,22 +7417,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 - local.get $3 + local.get $0 + local.get $5 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|2 end end - local.get $4 + local.get $0 i32.load offset=20 - local.get $1 + local.get $4 i32.load offset=20 i32.ne if @@ -7490,14 +7444,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|3 - local.get $0 + local.get $3 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7508,11 +7462,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7522,14 +7476,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|3 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -7542,14 +7496,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $3 loop $for-loop|4 - local.get $0 + local.get $3 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7559,12 +7513,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -7575,11 +7529,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $4 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -7589,14 +7543,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i64.const 1 i64.add - local.set $0 + local.set $3 br $for-loop|4 end end - local.get $1 + local.get $4 i32.load offset=20 i32.const 50 i32.ne @@ -7608,9 +7562,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 call $~lib/set/Set#clear - local.get $1 + local.get $4 i32.load offset=20 if i32.const 0 @@ -7620,11 +7574,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) @@ -8012,17 +7966,21 @@ i32.const 3 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $1 - f32.load - local.set $10 local.get $3 local.tee $1 + i32.const 1 + i32.add + local.set $3 + local.get $2 + f32.load + local.set $10 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u @@ -8057,10 +8015,6 @@ i32.add local.get $10 f32.store - local.get $1 - i32.const 1 - i32.add - local.set $3 end local.get $4 i32.const 1 @@ -8840,17 +8794,21 @@ i32.const 4 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $1 - f64.load - local.set $10 local.get $3 local.tee $1 + i32.const 1 + i32.add + local.set $3 + local.get $2 + f64.load + local.set $10 + local.get $1 local.get $0 i32.load offset=12 i32.ge_u @@ -8885,10 +8843,6 @@ i32.add local.get $10 f64.store - local.get $1 - i32.const 1 - i32.add - local.set $3 end local.get $4 i32.const 1 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index ec97281e2d..88276f236d 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -951,15 +951,15 @@ i32.add i32.const -16 i32.and - local.tee $3 + local.tee $4 i32.const 16 - local.get $3 + local.get $4 i32.const 16 i32.gt_u select - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -967,14 +967,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $5 i32.const 16 i32.shl i32.const 16 @@ -983,18 +983,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1005,18 +1005,18 @@ i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 + local.set $4 local.get $5 - local.get $3 + local.get $4 local.get $5 + local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $4 memory.grow i32.const 0 i32.lt_s @@ -1025,7 +1025,7 @@ end end local.get $0 - local.get $3 + local.get $5 i32.const 16 i32.shl memory.size @@ -1033,9 +1033,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1047,11 +1047,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1061,25 +1061,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 3968bce926..be9365d031 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1250,9 +1250,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -1260,14 +1260,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -1276,18 +1276,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1299,9 +1299,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -1318,7 +1318,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1326,9 +1326,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1340,11 +1340,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1354,25 +1354,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2924,74 +2924,77 @@ if local.get $0 i32.wrap_i64 + local.tee $2 local.tee $1 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $1 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $1 - i32.const 1000 - i32.ge_u - i32.add - local.get $1 - i32.const 100 - i32.lt_u - select - local.get $1 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $1 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $1 - i32.const 100000000 - i32.ge_u - i32.add - local.get $1 - i32.const 10000000 - i32.lt_u - select - local.get $1 i32.const 100000 i32.lt_u - select - local.tee $2 + if (result i32) + local.get $1 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $1 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $1 + i32.const 1000 + i32.ge_u + i32.add + local.get $1 + i32.const 100 + i32.lt_u + select + else + local.get $1 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $1 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $1 + i32.const 100000000 + i32.ge_u + i32.add + local.get $1 + i32.const 10000000 + i32.lt_u + select + end + local.tee $1 i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc local.tee $4 local.set $3 loop $do-continue|0 - local.get $1 + local.get $2 i32.const 10 i32.rem_u local.set $5 - local.get $1 + local.get $2 i32.const 10 i32.div_u - local.set $1 - local.get $3 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl + local.get $3 i32.add local.get $5 i32.const 48 i32.add i32.store16 - local.get $1 + local.get $2 br_if $do-continue|0 end else @@ -3055,13 +3058,13 @@ i64.const 10 i64.div_u local.set $0 - local.get $2 local.get $1 i32.const 1 i32.sub local.tee $1 i32.const 1 i32.shl + local.get $2 i32.add local.get $3 i32.const 48 @@ -4408,10 +4411,10 @@ i64.const 0 i64.ge_u if - local.get $4 local.get $0 i64.const 16 i64.shl + local.get $4 i64.add local.set $4 end @@ -4423,10 +4426,10 @@ i64.const 0 i64.ge_u if - local.get $4 local.get $0 i64.const 32 i64.shl + local.get $4 i64.add local.set $4 end @@ -4443,10 +4446,10 @@ i64.const 0 i64.ge_u if - local.get $0 local.get $1 i64.const 16 i64.shl + local.get $0 i64.add local.set $0 end @@ -4458,10 +4461,10 @@ i64.const 0 i64.ge_u if - local.get $0 local.get $1 i64.const 32 i64.shl + local.get $0 i64.add local.set $0 end @@ -4478,10 +4481,10 @@ i64.const 0 i64.ge_u if - local.get $1 local.get $2 i64.const 16 i64.shl + local.get $1 i64.add local.set $1 end @@ -4493,10 +4496,10 @@ i64.const 0 i64.ge_u if - local.get $1 local.get $2 i64.const 32 i64.shl + local.get $1 i64.add local.set $1 end @@ -4513,10 +4516,10 @@ i64.const 0 i64.ge_u if - local.get $2 local.get $7 i64.const 16 i64.shl + local.get $2 i64.add local.set $2 end @@ -4528,10 +4531,10 @@ i64.const 0 i64.ge_u if - local.get $2 local.get $7 i64.const 32 i64.shl + local.get $2 i64.add local.set $2 end diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 0e16ace529..65a30c54c8 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -983,9 +983,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -993,14 +993,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -1009,18 +1009,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1032,9 +1032,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -1051,7 +1051,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1059,9 +1059,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1073,11 +1073,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1087,25 +1087,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2458,7 +2458,7 @@ local.get $0 local.get $1 i32.add - local.tee $4 + local.tee $6 local.get $0 i32.lt_u if @@ -2474,11 +2474,11 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $5 - local.set $1 + local.tee $1 + local.set $4 loop $while-continue|0 local.get $0 - local.get $4 + local.get $6 i32.lt_u if block $while-break|0 @@ -2494,14 +2494,14 @@ i32.and if local.get $0 - local.get $4 + local.get $6 i32.eq br_if $while-break|0 local.get $0 i32.load8_u i32.const 63 i32.and - local.set $6 + local.set $5 local.get $0 i32.const 1 i32.add @@ -2512,18 +2512,18 @@ i32.const 192 i32.eq if - local.get $1 - local.get $6 + local.get $4 local.get $3 i32.const 31 i32.and i32.const 6 i32.shl + local.get $5 i32.or i32.store16 else local.get $0 - local.get $4 + local.get $6 i32.eq br_if $while-break|0 local.get $0 @@ -2541,21 +2541,21 @@ i32.const 224 i32.eq if - local.get $7 local.get $3 i32.const 15 i32.and i32.const 12 i32.shl - local.get $6 + local.get $5 i32.const 6 i32.shl i32.or + local.get $7 i32.or local.set $3 else local.get $0 - local.get $4 + local.get $6 i32.eq br_if $while-break|0 local.get $0 @@ -2567,7 +2567,7 @@ i32.and i32.const 18 i32.shl - local.get $6 + local.get $5 i32.const 12 i32.shl i32.or @@ -2586,11 +2586,11 @@ i32.const 65536 i32.lt_u if - local.get $1 + local.get $4 local.get $3 i32.store16 else - local.get $1 + local.get $4 local.get $3 i32.const 65536 i32.sub @@ -2608,41 +2608,41 @@ i32.shl i32.or i32.store - local.get $1 + local.get $4 i32.const 2 i32.add - local.set $1 + local.set $4 end end else - local.get $2 local.get $3 i32.eqz + local.get $2 i32.and br_if $while-break|0 - local.get $1 + local.get $4 local.get $3 i32.store16 end - local.get $1 + local.get $4 i32.const 2 i32.add - local.set $1 + local.set $4 br $while-continue|0 end end end call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $1 i32.const 16 i32.sub local.set $0 - local.get $5 + local.get $1 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $5 + local.get $1 select if (result i32) local.get $0 @@ -2672,8 +2672,8 @@ unreachable end local.get $0 + local.get $4 local.get $1 - local.get $5 i32.sub call $~lib/rt/tlsf/reallocateBlock i32.const 16 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index bd8abab68c..65842e1998 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1465,9 +1465,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -1475,14 +1475,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -1491,18 +1491,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1514,9 +1514,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -1533,7 +1533,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1541,9 +1541,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1555,11 +1555,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1569,25 +1569,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -7185,13 +7185,13 @@ global.get $std/string/str local.set $12 i32.const 1616 - local.tee $1 + local.tee $0 i32.eqz if i32.const 1616 call $~lib/rt/pure/__release i32.const 1648 - local.set $1 + local.set $0 end block $__inlined_func$~lib/string/String#startsWith i32.const 0 @@ -7203,30 +7203,30 @@ i32.lt_s select local.tee $8 - local.get $1 + local.get $0 call $~lib/string/String#get:length - local.tee $0 + local.tee $1 i32.add local.get $11 i32.gt_s if - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 0 - local.set $0 + local.set $1 br $__inlined_func$~lib/string/String#startsWith end local.get $12 local.get $8 - local.get $1 local.get $0 + local.get $1 call $~lib/util/string/compareImpl i32.eqz - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end - local.get $0 + local.get $1 i32.eqz if i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index f9b982e4fd..7698cecf1d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -386,11 +386,11 @@ local.get $3 i32.lt_u if - local.get $1 local.get $0 local.get $2 i32.add i32.load8_u + local.get $1 i32.xor i32.const 16777619 i32.mul @@ -575,99 +575,89 @@ i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $3 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $2 + local.get $4 local.get $7 i32.ne if - local.get $2 - local.set $6 - local.get $2 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $6 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $6 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 - local.get $6 + local.get $2 + local.get $4 i32.load call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl + local.get $5 i32.add - local.tee $6 + local.tee $8 i32.load i32.store offset=8 - local.get $6 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $4 i32.const 12 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $3 local.get $0 - local.tee $2 i32.load - i32.ne drop - local.get $2 - local.get $3 + local.get $0 + local.get $5 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $2 - local.tee $3 + local.get $0 i32.load offset=8 - i32.ne drop + local.get $0 local.get $3 - local.get $1 i32.store offset=8 - local.get $3 - local.get $8 + local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 ) @@ -851,99 +841,89 @@ i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $3 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $4 - local.set $3 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $2 + local.get $4 local.get $7 i32.ne if - local.get $2 - local.set $6 - local.get $2 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $6 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $6 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 - local.get $6 + local.get $2 + local.get $4 i32.load call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl + local.get $5 i32.add - local.tee $6 + local.tee $8 i32.load i32.store offset=8 - local.get $6 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $4 i32.const 12 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $3 local.get $0 - local.tee $2 i32.load - i32.ne drop - local.get $2 - local.get $3 + local.get $0 + local.get $5 i32.store - local.get $2 + local.get $0 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $2 - local.tee $3 + local.get $0 i32.load offset=8 - i32.ne drop + local.get $0 local.get $3 - local.get $1 i32.store offset=8 - local.get $3 - local.get $8 + local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 0d87d01bf5..b334e3ae07 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,6 +1,6 @@ (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_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))) @@ -1093,9 +1093,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $4 - call $~lib/rt/tlsf/searchBlock local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $4 i32.eqz if i32.const 1 @@ -1103,14 +1103,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl i32.const 16 @@ -1119,18 +1119,18 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 i32.const 1 i32.const 27 - local.get $4 + local.get $3 i32.clz i32.sub i32.shl i32.const 1 i32.sub + local.get $3 i32.add - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 536870904 i32.lt_u select @@ -1142,9 +1142,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $3 + local.get $4 local.get $5 - local.get $3 + local.get $4 local.get $5 i32.gt_s select @@ -1161,7 +1161,7 @@ end end local.get $0 - local.get $3 + local.get $4 i32.const 16 i32.shl memory.size @@ -1169,9 +1169,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $4 i32.eqz if i32.const 0 @@ -1183,11 +1183,11 @@ end end end - local.get $3 + local.get $4 i32.load i32.const -4 i32.and - local.get $4 + local.get $3 i32.lt_u if i32.const 0 @@ -1197,25 +1197,25 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 local.get $4 - call $~lib/rt/tlsf/prepareBlock local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $4 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $4 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2860,6 +2860,8 @@ (local $4 i32) (local $5 i32) (local $6 i32) + local.get $1 + local.set $4 local.get $0 call $~lib/rt/pure/__retain local.tee $5 @@ -2867,13 +2869,13 @@ local.set $6 local.get $5 i32.load offset=8 - local.set $4 + local.set $1 local.get $2 i32.const 0 i32.lt_s if (result i32) + local.get $1 local.get $2 - local.get $4 i32.add local.tee $0 i32.const 0 @@ -2883,43 +2885,43 @@ select else local.get $2 - local.get $4 + local.get $1 local.get $2 - local.get $4 + local.get $1 i32.lt_s select end - local.tee $2 + local.tee $0 local.get $3 i32.const 0 i32.lt_s if (result i32) + local.get $1 local.get $3 - 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 else local.get $3 - local.get $4 + local.get $1 local.get $3 - local.get $4 + local.get $1 i32.lt_s select end - local.tee $0 + local.tee $1 i32.lt_s if - local.get $2 + local.get $0 local.get $6 i32.add + local.get $4 local.get $1 local.get $0 - local.get $2 i32.sub call $~lib/memory/memory.fill end @@ -3275,9 +3277,9 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $0 local.get $3 i32.load offset=4 + local.get $0 i32.add i32.store offset=4 local.get $2 @@ -3358,10 +3360,10 @@ local.get $1 i32.lt_s if - local.get $6 local.get $0 i32.const 2 i32.shl + local.get $6 i32.add local.get $4 i32.store @@ -3501,11 +3503,11 @@ i32.const 0 i32.gt_s select - local.tee $2 + local.tee $4 call $~lib/typedarray/Int32Array#constructor local.tee $3 call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.load offset=4 local.get $0 i32.load offset=4 @@ -3513,52 +3515,51 @@ i32.const 2 i32.shl i32.add - local.get $2 + local.get $4 i32.const 2 i32.shl call $~lib/memory/memory.copy local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 ) (func $~lib/typedarray/Int32Array#copyWithin (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 call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 + local.tee $0 local.get $3 - local.get $4 + local.get $0 i32.lt_s select local.set $3 - local.get $5 + local.get $4 i32.load offset=4 - local.tee $6 + local.tee $5 local.get $1 i32.const 0 i32.lt_s if (result i32) + local.get $0 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 else local.get $1 - local.get $4 + local.get $0 local.get $1 - local.get $4 + local.get $0 i32.lt_s select end @@ -3566,57 +3567,57 @@ i32.const 2 i32.shl i32.add - local.get $6 local.get $2 i32.const 0 i32.lt_s if (result i32) + local.get $0 local.get $2 - 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 else local.get $2 - local.get $4 + local.get $0 local.get $2 - local.get $4 + local.get $0 i32.lt_s select end - local.tee $0 + local.tee $2 i32.const 2 i32.shl + local.get $5 i32.add local.get $3 i32.const 0 i32.lt_s if (result i32) + local.get $0 local.get $3 - local.get $4 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 $3 - local.get $4 + local.get $0 local.get $3 - local.get $4 + local.get $0 i32.lt_s select end - local.get $0 + local.get $2 i32.sub local.tee $2 - local.get $4 + local.get $0 local.get $1 i32.sub local.tee $0 @@ -3627,7 +3628,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $5 + local.get $4 ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 @@ -4059,6 +4060,124 @@ local.get $0 i32.mul ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + (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 $4 + 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=8 + local.set $2 + local.get $0 + i32.load offset=4 + local.set $5 + 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.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $3 + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_s + local.tee $6 + local.get $6 + 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 + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4078,91 +4197,253 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + (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 $4 + local.tee $0 + i32.const 0 i32.const 1 - i32.shr_u - i32.ge_u + 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.load offset=8 + local.set $2 + local.get $0 + i32.load offset=4 + local.set $5 + 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.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $3 + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 + 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 + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 408 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 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 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + (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/Uint8ClampedArray#constructor + local.tee $4 + 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.load offset=8 + local.set $2 + local.get $0 + i32.load offset=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 $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 + 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 + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 - i32.shr_u - i32.ge_u + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 536 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 365 + i32.const 3 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/typedarray/Uint32Array#__get (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 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 792 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 366 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) - local.get $0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 367 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/pure/__release local.get $0 - i64.mul + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.ge_u if i32.const 1376 i32.const 1440 - i32.const 920 + i32.const 408 i32.const 64 call $~lib/builtins/abort unreachable @@ -4170,189 +4451,12 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 3 + i32.const 1 i32.shl i32.add - i64.load + i32.load16_s ) - (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 1048 - i32.const 64 - 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 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 - local.get $0 - f32.mul - ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 1176 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 - local.get $0 - f64.mul - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 2 - i32.gt_s - ) - (func $~lib/rt/tlsf/reallocateBlock (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 - 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.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 - if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $5 - i32.const 3 - i32.and - local.get $4 - i32.or - i32.store - local.get $1 - local.get $2 - 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 $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 8396 - 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 (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 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4361,69 +4465,63 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 6 - call $~lib/typedarray/Int8Array#constructor + (local $8 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__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 + call $~lib/typedarray/Int16Array#__set local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 3 + i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $0 local.get $5 + i32.const 1 + i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 - local.set $0 + local.set $2 loop $for-loop|0 local.get $3 local.get $5 i32.lt_s if - local.get $0 - local.get $3 - i32.add - i32.load8_s - local.set $7 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $6 local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + i32.const 1 + i32.shl + local.tee $8 + i32.add + i32.load16_s + local.tee $4 + local.get $4 + i32.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i32.store16 local.get $3 i32.const 1 i32.add @@ -4431,78 +4529,53 @@ br $for-loop|0 end end - local.get $4 - local.get $6 + local.get $0 local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $2 - i32.store offset=8 - local.get $4 local.get $0 + local.get $2 i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $7 + 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 3 + call $~lib/typedarray/Int16Array#__get + i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 5 + call $~lib/typedarray/Int16Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable @@ -4512,14 +4585,30 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.gt_u + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 1376 + i32.const 1440 + i32.const 536 + i32.const 64 + 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/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4528,69 +4617,63 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor + (local $8 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__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 + call $~lib/typedarray/Uint16Array#__set local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 4 + i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $0 local.get $5 + i32.const 1 + i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 - local.set $0 + local.set $2 loop $for-loop|0 local.get $3 local.get $5 i32.lt_s if - local.get $0 - local.get $3 - i32.add - i32.load8_u - local.set $7 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $6 local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + i32.const 1 + i32.shl + local.tee $8 + i32.add + i32.load16_u + local.tee $4 + local.get $4 + i32.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i32.store16 local.get $3 i32.const 1 i32.add @@ -4598,78 +4681,53 @@ br $for-loop|0 end end - local.get $4 - local.get $6 + local.get $0 local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $0 local.get $2 + i32.store offset=4 + local.get $0 + local.get $7 i32.store offset=8 - local.get $4 local.get $0 - i32.store offset=4 - local.get $4 call $~lib/rt/pure/__retain local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 3 + call $~lib/typedarray/Uint16Array#__get + i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable @@ -4679,7 +4737,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4688,69 +4746,63 @@ (local $5 i32) (local $6 i32) (local $7 i32) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor + (local $8 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__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 + call $~lib/typedarray/Int32Array#__set local.get $1 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 5 + i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $0 local.get $5 + i32.const 2 + i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 - i32.load offset=4 - local.set $0 + local.set $2 loop $for-loop|0 local.get $3 local.get $5 i32.lt_s if - local.get $0 - local.get $3 - i32.add - i32.load8_u - local.set $7 i32.const 3 global.set $~argumentsLength - local.get $7 + local.get $6 local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 - if - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - end + i32.const 2 + i32.shl + local.tee $8 + i32.add + i32.load + local.tee $4 + local.get $4 + i32.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i32.store local.get $3 i32.const 1 i32.add @@ -4758,78 +4810,53 @@ br $for-loop|0 end end - local.get $4 - local.get $6 + local.get $0 local.get $2 - call $~lib/rt/tlsf/__realloc - local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $0 local.get $2 + i32.store offset=4 + local.get $0 + local.get $7 i32.store offset=8 - local.get $4 local.get $0 - i32.store offset=4 - local.get $4 call $~lib/rt/pure/__retain local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 3 + call $~lib/typedarray/Int32Array#__get + i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 + call $~lib/typedarray/Int32Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable @@ -4839,16 +4866,31 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=8 i32.const 2 - i32.gt_s + i32.shr_u + i32.ge_u + if + i32.const 1376 + i32.const 1440 + i32.const 792 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4856,55 +4898,63 @@ (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 - i32.load offset=8 + (local $8 i32) + 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.load offset=8 + i32.const 2 i32.shr_u - local.set $1 + local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 6 + i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $1 - i32.const 1 + local.set $0 + local.get $5 + i32.const 2 i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 + local.set $2 loop $for-loop|0 local.get $3 - local.get $1 + local.get $5 i32.lt_s if - local.get $7 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 local.get $3 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 - if - local.get $5 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - end + i32.const 2 + i32.shl + local.tee $8 + i32.add + i32.load + local.tee $4 + local.get $4 + i32.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i32.store local.get $3 i32.const 1 i32.add @@ -4912,184 +4962,156 @@ br $for-loop|0 end end + local.get $0 local.get $2 - local.get $5 - local.get $4 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 + call $~lib/typedarray/Uint32Array#__get 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 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 1312 - i32.const 390 - i32.const 3 - 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 1312 - i32.const 391 - i32.const 3 - 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 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 5 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 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/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 - i32.const 65535 - i32.and - i32.const 2 - i32.gt_u + local.get $0 + i64.mul ) - (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) + local.get $1 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.set $1 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $2 + i32.ge_u + if + i32.const 1376 + i32.const 1440 + i32.const 920 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 local.get $1 - i32.const 1 + i32.const 3 i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + 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.load offset=8 + i32.const 3 + i32.shr_u local.set $5 - local.get $0 + local.get $1 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.set $0 + local.get $5 + i32.const 3 + i32.shl + local.tee $7 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $2 loop $for-loop|0 local.get $3 - local.get $1 + local.get $5 i32.lt_s if - local.get $7 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 local.get $3 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 - if - local.get $5 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.store16 - local.get $4 - i32.const 1 - i32.add - local.set $4 - end + i32.const 3 + i32.shl + local.tee $8 + i32.add + i64.load + local.tee $4 + local.get $4 + i64.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i64.store local.get $3 i32.const 1 i32.add @@ -5097,777 +5119,727 @@ br $for-loop|0 end end + local.get $0 local.get $2 - local.get $5 - local.get $4 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> - (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 - 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 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne if i32.const 0 i32.const 1312 - i32.const 390 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=8 + local.get $0 i32.const 1 - i32.shr_u - i32.const 3 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1312 - i32.const 391 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 3 - i32.ne + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 367 i32.const 3 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 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1048 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 2 - i32.gt_s + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 + (local $7 i32) + (local $8 i32) + 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.load offset=8 + i32.const 3 i32.shr_u - local.set $4 + local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 8 + i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 - i32.const 2 + local.set $0 + local.get $5 + i32.const 3 i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 + local.set $2 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if + i32.const 3 + global.set $~argumentsLength local.get $6 - local.get $1 - i32.const 2 + local.get $3 + i32.const 3 i32.shl + local.tee $8 i32.add - i32.load - local.set $0 - i32.const 3 - global.set $~argumentsLength - local.get $0 - i32.const 2 - i32.gt_s - if - local.get $5 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end - local.get $1 + i64.load + local.tee $4 + local.get $4 + i64.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + i64.store + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end + local.get $0 local.get $2 - local.get $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - (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 - 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 - local.get $0 - call $~lib/typedarray/Int32Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne if i32.const 0 i32.const 1312 - i32.const 390 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1312 - i32.const 391 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 367 i32.const 3 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 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + local.get $0 + local.get $0 + f32.mul + ) + (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1176 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 i32.const 2 - i32.gt_u + i32.shl + i32.add + f32.load ) - (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 i32) (local $6 i32) - local.get $0 + (local $7 i32) + (local $8 i32) + 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.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 + i32.const 12 i32.const 12 - i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $0 + local.get $5 i32.const 2 i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 + local.set $2 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if + i32.const 3 + global.set $~argumentsLength local.get $6 - local.get $1 + local.get $3 i32.const 2 i32.shl + local.tee $8 i32.add - i32.load - local.set $0 - i32.const 3 - global.set $~argumentsLength - local.get $0 - i32.const 2 - i32.gt_u - if - local.get $5 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end - local.get $1 + f32.load + local.tee $4 + local.get $4 + f32.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + f32.store + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end + local.get $0 local.get $2 - local.get $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - (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 - local.get $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 $7 + i32.store offset=8 local.get $0 - call $~lib/typedarray/Uint32Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne if i32.const 0 i32.const 1312 - i32.const 393 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne if i32.const 0 i32.const 1312 - i32.const 394 + i32.const 367 i32.const 3 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/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 - i64.const 2 - i64.gt_s + local.get $0 + f64.mul ) - (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 i64) - local.get $0 + (local $6 i32) + (local $7 i32) + (local $8 i32) + 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.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $5 + local.get $1 + i32.load offset=4 + local.set $6 i32.const 12 - i32.const 10 + i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $0 + local.get $5 i32.const 3 i32.shl + local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $0 + local.set $2 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if - local.get $0 - local.get $1 - 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 - if - local.get $5 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $6 - i64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - end - local.get $1 + local.get $3 + i32.const 3 + i32.shl + local.tee $8 + i32.add + f64.load + local.tee $4 + local.get $4 + f64.mul + local.set $4 + local.get $2 + local.get $8 + i32.add + local.get $4 + f64.store + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end + local.get $0 local.get $2 - local.get $5 - local.get $3 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $2 local.get $0 - i32.store offset=8 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $0 + local.get $7 + i32.store offset=8 + local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - (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 - 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 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 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne if i32.const 0 i32.const 1312 - i32.const 390 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne if i32.const 0 i32.const 1312 - i32.const 391 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne if i32.const 0 i32.const 1312 - i32.const 392 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 2 + i32.gt_s + ) + (func $~lib/rt/tlsf/reallocateBlock (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 + 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.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + 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 - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + if + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $5 + i32.const 3 + i32.and + local.get $4 + i32.or + i32.store + local.get $1 + local.get $2 + 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 - call $~lib/rt/pure/__release + local.get $2 local.get $1 - call $~lib/rt/pure/__release + 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 8396 + 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 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 - i64.const 2 - i64.gt_u + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add ) - (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i64) + (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.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 i32.const 3 - i32.shr_u - local.set $4 + 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 11 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 i32.const 3 - i32.shl + call $~lib/rt/tlsf/__alloc + 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 $0 + local.set $8 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if - local.get $0 - local.get $1 - i32.const 3 - i32.shl + local.get $3 + local.get $8 i32.add - i64.load - local.set $6 + i32.load8_s + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - i64.const 2 - i64.gt_u + local.get $7 + local.get $3 + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 if - local.get $5 - local.get $3 - i32.const 3 - i32.shl + local.get $0 + local.tee $2 + i32.const 1 i32.add + local.set $0 + local.get $2 local.get $6 - i64.store - local.get $3 - i32.const 1 i32.add - local.set $3 + local.get $7 + i32.store8 end - 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 $2 - local.get $5 - local.get $3 - i32.const 3 - i32.shl - local.tee $0 + local.get $4 + local.get $6 + local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $1 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $4 local.get $0 i32.store offset=8 + local.get $4 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - (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 - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 5 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - call $~lib/typedarray/Uint64Array#filter - local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -5877,11 +5849,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u - i32.const 3 i32.ne if i32.const 0 @@ -5891,11 +5861,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 3 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 @@ -5904,11 +5874,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 @@ -5917,11 +5887,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -5930,125 +5900,119 @@ 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/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 2 - f32.gt + i32.const 255 + i32.and + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 f32) + (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.load offset=8 + i32.const 1 i32.const 2 - i32.shr_u - local.set $4 - i32.const 12 + 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 4 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 - i32.const 2 - i32.shl + 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 $0 + local.set $8 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if - local.get $0 - local.get $1 - i32.const 2 - i32.shl + local.get $3 + local.get $8 i32.add - f32.load - local.set $6 + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - f32.const 2 - f32.gt + local.get $7 + local.get $3 + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if - local.get $5 - local.get $3 - i32.const 2 - i32.shl + local.get $0 + local.tee $2 + i32.const 1 i32.add + local.set $0 + local.get $2 local.get $6 - f32.store - local.get $3 - i32.const 1 i32.add - local.set $3 + local.get $7 + i32.store8 end - 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 $2 - local.get $5 - local.get $3 - i32.const 2 - i32.shl - local.tee $0 + local.get $4 + local.get $6 + local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $1 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $4 local.get $0 i32.store offset=8 + local.get $4 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - (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 - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 5 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#filter - local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -6058,10 +6022,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 i32.ne if @@ -6072,11 +6034,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 3 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 @@ -6085,11 +6047,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 @@ -6098,11 +6060,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -6111,125 +6073,112 @@ 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 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.gt + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 f64) + (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 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 i32.const 3 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + 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 5 + 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 $8 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if - local.get $0 - local.get $1 - i32.const 3 - i32.shl + local.get $3 + local.get $8 i32.add - f64.load - local.set $6 + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - f64.const 2 - f64.gt + local.get $7 + local.get $3 + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if - local.get $5 - local.get $3 - i32.const 3 - i32.shl + local.get $0 + local.tee $2 + i32.const 1 i32.add + local.set $0 + local.get $2 local.get $6 - f64.store - local.get $3 - i32.const 1 i32.add - local.set $3 + local.get $7 + i32.store8 end - 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 $2 - local.get $5 - local.get $3 - i32.const 3 - i32.shl - local.tee $0 + local.get $4 + local.get $6 + local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $1 + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $4 local.get $0 i32.store offset=8 + local.get $4 local.get $2 - local.get $1 i32.store offset=4 - local.get $2 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - (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 @@ -6239,11 +6188,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u - i32.const 3 i32.ne if i32.const 0 @@ -6253,11 +6200,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 3 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 @@ -6266,11 +6213,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 @@ -6279,11 +6226,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -6292,1010 +6239,1501 @@ 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/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.const 2 - i32.eq + i32.gt_s ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $5 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc local.set $3 + local.get $5 + i32.const 1 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $6 local.get $0 - i32.load offset=8 - local.set $4 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $2 local.get $4 + local.get $5 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - 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 $8 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $7 + i32.const 3 + global.set $~argumentsLength + local.get $7 + local.get $4 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + if local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - end + local.tee $2 + i32.const 1 + i32.add + local.set $1 + local.get $6 local.get $2 i32.const 1 + i32.shl i32.add - local.set $2 - br $for-loop|0 + local.get $7 + i32.store16 end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 end end - local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $3 + local.get $6 + local.get $1 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $3 local.get $0 - i32.const 255 - i32.and - i32.eqz + i32.store offset=8 + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.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 - 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) - 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 - local.set $2 - br $for-loop|0 - end - end - end - local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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 65535 - i32.and + i32.const 1 i32.const 2 - i32.eq - ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end 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 - 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) - 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 - local.set $2 - br $for-loop|0 - end - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + 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 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and - i32.eqz + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (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 + local.set $5 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $5 + i32.const 1 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $6 + local.get $0 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $2 local.get $4 + local.get $5 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 + local.get $8 + local.get $4 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $7 + i32.const 3 + global.set $~argumentsLength + local.get $7 + local.get $4 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + if + local.get $1 + local.tee $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) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - end + local.set $1 + local.get $6 local.get $2 i32.const 1 + i32.shl i32.add - local.set $2 - br $for-loop|0 + local.get $7 + i32.store16 end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 end end - local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $3 + local.get $6 + local.get $1 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $3 local.get $0 - i32.const 2 - i32.eq - ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.store offset=8 + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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.load offset=4 - local.set $3 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=8 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + 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/Int32Array,i32>|inlined.0 - 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) - 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 - local.set $2 - br $for-loop|0 - end - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.eqz + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.eq + i32.const 2 + i32.gt_s ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (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 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 $2 + local.get $3 local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - 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 $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 $1 - call_indirect (type $i64_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $1 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end end + local.get $2 local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i64.eqz + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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 - f32.const 2 - f32.eq - ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end 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 - 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) - 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 - local.set $2 - br $for-loop|0 - end - end + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 0 - f32.eq + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.eq + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (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 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 $2 + local.get $3 local.get $4 i32.lt_s if - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - 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 $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 + if local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $1 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end end + local.get $2 local.get $5 - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - f64.const 0 - f64.eq + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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.load offset=4 - local.set $3 + 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 5 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + call $~lib/typedarray/Uint32Array#filter + local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end 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 - 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 - end - i32.const -1 - local.set $2 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const 4 - i32.eq - ) - (func $~lib/typedarray/Uint8Array#findIndex (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 - 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.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#findIndex (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 - 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 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 4 - i32.eq + i64.const 2 + i64.gt_s ) - (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i64) + (local $7 i32) 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 - local.get $2 - local.get $4 - i32.lt_s + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 + local.get $1 + local.tee $0 i32.const 1 - i32.shl i32.add - i32.load16_u - local.get $2 + local.set $1 + local.get $5 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.const 3 + i32.shl i32.add - local.set $2 - br $for-loop|0 + local.get $6 + i64.store 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 $2 - ) - (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + local.get $5 + local.get $1 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i32.load offset=4 - local.set $3 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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.load offset=8 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 i32.shr_u - 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 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 + local.get $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 4 - i32.eq + i64.const 2 + i64.gt_u ) - (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + (local $6 i64) + (local $7 i32) 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 - i32.lt_s + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 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 + local.tee $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $1 + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $6 + i64.store 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 $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $5 + local.get $1 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i64.const 4 - i64.eq + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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.load offset=4 - local.set $3 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set 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 - 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 $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $0 - f32.const 4 - f32.eq - ) - (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 5 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#filter + local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 - 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 - 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 - end - end - i32.const -1 - local.set $2 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + 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 + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 2 + f32.gt + ) + (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $6 f32) + (local $7 i32) local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 - block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 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) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $1 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $5 end + local.get $2 local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - i32.const 1 - i32.and - i32.eqz + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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.load offset=4 - local.set $3 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set 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 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - local.set $5 + 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.load offset=8 i32.const 2 - i32.rem_s - i32.eqz - ) - (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=4 - local.set $3 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end 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 - 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) - i32.eqz - br_if $~lib/typedarray/EVERY<~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 $5 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f64.const 2 + f64.gt + ) + (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $6 f64) + (local $7 i32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 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 - i32.lt_s + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.set $2 + 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 - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 + local.get $1 + local.tee $0 i32.const 1 - i32.shl i32.add - i32.load16_u - local.get $2 + local.set $1 + local.get $5 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 - local.get $2 - i32.const 1 + i32.const 3 + i32.shl i32.add - local.set $2 - br $for-loop|0 + local.get $6 + f64.store end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 end - i32.const 1 - local.set $5 end + local.get $2 local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (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 (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + i32.const 6 + 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 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (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 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7305,29 +7743,28 @@ 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 - i32.lt_s - if + 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 - local.get $3 local.get $2 - i32.const 2 - i32.shl + local.get $3 i32.add - i32.load + 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/Int32Array,i32>|inlined.0 + 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 @@ -7335,18 +7772,16 @@ br $for-loop|0 end end - i32.const 1 - local.set $5 end local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.rem_s - i64.eqz + i32.const 255 + i32.and + i32.eqz ) - (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7356,29 +7791,28 @@ 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 - i32.lt_s - if + 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 - local.get $3 local.get $2 - i32.const 3 - i32.shl + local.get $3 i32.add - i64.load + i32.load8_u 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 + call_indirect (type $i32_i32_i32_=>_i32) + 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 @@ -7386,171 +7820,120 @@ br $for-loop|0 end end - i32.const 1 - local.set $5 end local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.rem_u - i64.eqz + i32.const 65535 + i32.and + i32.const 2 + i32.eq ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 1 - i32.const 0 + (local $5 i32) local.get $0 - i32.reinterpret_f32 - local.tee $1 - i32.const 23 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 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 - 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 + loop $for-loop|0 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 $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 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add + i32.load16_s + local.get $2 + local.get $0 local.get $1 - i32.const 8388608 - i32.ge_u + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 - i32.const 8388608 - i32.eq - br_if $folding-inner0 - local.get $1 - i32.const 8388608 - i32.sub - local.set $1 + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $1 - i32.const 1 - i32.shl - local.set $1 local.get $2 i32.const 1 - i32.sub + i32.add local.set $2 - br $while-continue|0 + br $for-loop|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 + end + local.get $5 + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (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 $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 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add + i32.load16_u + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + 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 + local.set $2 + br $for-loop|0 + end + end end - f32.const 0 - local.get $0 - f32.mul + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/math/NativeMathf.mod - f32.const 0 - f32.eq + i32.const 2 + i32.eq ) - (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7563,26 +7946,29 @@ 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 - i32.lt_s - if + 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 - local.get $3 local.get $2 i32.const 2 i32.shl + local.get $3 i32.add - f32.load + i32.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 + call_indirect (type $i32_i32_i32_=>_i32) + 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 @@ -7590,172 +7976,74 @@ br $for-loop|0 end end - i32.const 1 - local.set $5 end local.get $5 ) - (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - i32.const 1 - i32.const 0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.reinterpret_f64 - local.tee $1 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $2 - i64.const 2047 + i32.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 2 i64.eq - select - if - local.get $0 - f64.const 2 - f64.mul - local.tee $0 - local.get $0 - f64.div - return - end - local.get $1 - i64.const 63 - i64.shr_u + ) + (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.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 $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 + loop $for-loop|0 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 $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + i32.add + i64.load + local.get $2 + local.get $0 local.get $1 - i64.const 4503599627370496 - i64.ge_u + call_indirect (type $i64_i32_i32_=>_i32) if - local.get $1 - i64.const 4503599627370496 - i64.eq - br_if $folding-inner0 - local.get $1 - i64.const 4503599627370496 - i64.sub - local.set $1 + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $1 - i64.const 1 - i64.shl - local.set $1 local.get $2 - i64.const 1 - i64.sub + i32.const 1 + i32.add local.set $2 - br $while-continue|0 + br $for-loop|0 end end - 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 - f64.const 0 + local.get $5 + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.mul + i64.eqz ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/math/NativeMath.mod - f64.const 0 - f64.eq + f32.const 2 + f32.eq ) - (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7765,29 +8053,32 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 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 - i32.lt_s - if + 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 - local.get $3 local.get $2 - i32.const 3 + i32.const 2 i32.shl + local.get $3 i32.add - f64.load + f32.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 + call_indirect (type $f32_i32_i32_=>_i32) + 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 @@ -7795,176 +8086,156 @@ br $for-loop|0 end end - i32.const 1 - local.set $5 end local.get $5 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + f32.const 0 + f32.eq ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f64.const 2 + f64.eq + ) + (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.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 - 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_=>_none) - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + i32.add + f64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + 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 + local.set $2 + br $for-loop|0 + end end end + local.get $5 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable + f64.const 0 + f64.eq + ) + (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $3 + 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 + 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 + end + i32.const -1 + local.set $2 end local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - 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 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 255 + i32.and + i32.const 4 + i32.eq + ) + (func $~lib/typedarray/Uint8Array#findIndex (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 + 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 $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7973,77 +8244,48 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + 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 - 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_=>_none) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + loop $for-loop|0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + 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 $2 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i32.const 65535 + i32.and + i32.const 4 + i32.eq ) - (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8052,1415 +8294,1370 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + 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 - 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_=>_none) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + loop $for-loop|0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + 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 end + i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 $2 + i32.const 2 + i32.shl + local.get $3 + 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 end local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - 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 (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + i32.const 4 + i32.eq ) - (func $~lib/typedarray/Int8Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result 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 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $4 - i32.add - local.tee $2 - i32.load8_s - local.set $5 + 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 $0 local.get $4 - i32.add - local.tee $2 - i32.load8_s - i32.store8 - local.get $2 - local.get $5 - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + 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 $3 + local.get $2 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 4 + i64.eq + ) + (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 2812 - 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.get $0 + i32.load offset=4 local.set $3 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if + 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 $0 - i32.const 2800 - 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 2800 - 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 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 2 + i32.shl + local.get $3 + 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 $2 - 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 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 4 + f32.eq + ) + (func $~lib/typedarray/Float64Array#findIndex (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 local.get $2 - local.get $0 - call $~lib/typedarray/Int8Array#__get - i32.const 2800 - 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 + local.get $4 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + 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 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 $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 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $2 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + f64.const 4 + f64.eq + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result 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 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - local.get $4 - i32.add - local.tee $2 - i32.load8_u - local.set $5 + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 + loop $for-loop|0 local.get $2 - local.get $0 local.get $4 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - local.get $5 - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 + 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) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + i32.const 1 + local.set $5 end - local.get $3 + local.get $5 ) - (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (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 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=8 - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select + i32.load offset=4 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 + 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 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + local.set $5 + end + local.get $5 + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) 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 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 2 + i32.rem_s + i32.eqz ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 2812 - 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.get $0 + i32.load offset=4 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 2800 - 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 2800 - 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 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if + 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 $0 - call $~lib/typedarray/Uint8Array#__get - i32.const 2800 - 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 + local.get $4 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 end + i32.const 1 + local.set $5 end - 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 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $5 + ) + (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 1 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + local.set $5 end + local.get $5 + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.rem_s + i32.eqz + ) + (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 3 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 2 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + local.set $5 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 + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + i64.const 2 + i64.rem_s + i64.eqz ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=8 - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select + i32.load offset=4 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.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 + 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 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + local.set $5 + end + local.get $5 + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) 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 + i64.const 2 + i64.rem_u + i64.eqz ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) + (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 2812 - i32.load + i32.const 1 + i32.const 0 + local.get $0 + i32.reinterpret_f32 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 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2800 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 - local.get $0 - i32.const 2800 - 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 + 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 + local.get $1 + i32.const -2147483648 + i32.and + local.set $4 + block $folding-inner0 local.get $1 - i32.lt_s + i32.const 1 + i32.shl + local.tee $3 + i32.const -2147483648 + i32.le_u if - local.get $2 + local.get $3 + i32.const -2147483648 + i32.eq + br_if $folding-inner0 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 2800 + 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 $1 + i32.const 9 + i32.shl + i32.clz i32.sub - local.get $0 + local.tee $2 i32.sub - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne + i32.shl + end + local.set $1 + loop $while-continue|0 + local.get $2 + i32.const 128 + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 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 1312 - i32.const 529 - i32.const 3 - 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 1312 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 6 - 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 + 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.const 1312 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + f32.const 0 local.get $0 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + f32.mul + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + call $~lib/math/NativeMathf.mod + f32.const 0 + f32.eq ) - (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result 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 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - local.set $5 + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 + loop $for-loop|0 local.get $2 local.get $4 - local.get $0 - 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 $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 2 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + i32.const 1 + local.set $5 end - local.get $3 + local.get $5 ) - (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 + (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) i32.const 1 - i32.shr_u + i32.const 0 + local.get $0 + i64.reinterpret_f64 + local.tee $1 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s + i64.const 2047 + i64.eq select - local.set $3 + if + local.get $0 + f64.const 2 + f64.mul + local.tee $0 + local.get $0 + f64.div + return + end local.get $1 - i32.const 0 - i32.lt_s - if (result i32) + 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 - i32.add - local.tee $1 - i32.const 0 + 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 local.get $1 - i32.const 0 - i32.gt_s - select - else + 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 $2 local.get $1 + i64.const 11 + i64.shl + i64.clz + local.tee $3 + i64.shl + local.set $1 local.get $2 - i32.lt_s - select + 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 - local.set $1 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $2 + f64.const 0 local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 + f64.mul + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) 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 + call $~lib/math/NativeMath.mod + f64.const 0 + f64.eq ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 2812 - 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.get $0 + i32.load offset=4 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 2800 - 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 2800 - 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 $2 - 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 + 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 $0 - call $~lib/typedarray/Int16Array#__get - i32.const 2800 - local.get $1 - 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 + local.get $4 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 3 + i32.shl + local.get $3 + 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 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 end + i32.const 1 + local.set $5 end - 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 1312 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.get $5 + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 7 + i32.const 255 + i32.and + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and i32.ne if i32.const 0 i32.const 1312 - i32.const 530 - i32.const 3 + i32.const 490 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 6 + local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 i32.const 1312 - i32.const 531 - i32.const 3 + i32.const 491 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int16Array#__get - i32.const 5 + local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 i32.const 1312 - i32.const 532 - i32.const 3 + i32.const 492 + i32.const 5 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 + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $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 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $5 + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $4 - local.get $0 - i32.const 1 - i32.shl + local.get $3 i32.add - local.tee $2 - i32.load16_u - i32.store16 + i32.load8_u local.get $2 - local.get $5 - i32.store16 + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) 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 + i32.const 65535 + i32.and + i32.const 2704 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 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable 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.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/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - 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 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2800 - 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 2800 - 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 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable 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 2800 - local.get $1 - 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 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $3 - i32.const 8 - call $~lib/typedarray/Uint16Array#subarray - local.tee $1 - call $~lib/typedarray/Uint16Array#reverse - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 8 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 i32.const 1312 - i32.const 529 - i32.const 3 + i32.const 492 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 + global.get $std/typedarray/forEachCallCount i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + local.get $0 i32.ne if i32.const 0 i32.const 1312 - i32.const 530 - i32.const 3 + i32.const 490 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 + local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if i32.const 0 i32.const 1312 - i32.const 531 - i32.const 3 + i32.const 491 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 + local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if i32.const 0 i32.const 1312 - i32.const 532 - i32.const 3 + i32.const 492 + i32.const 5 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 + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $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 - local.get $3 + local.set $3 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - i32.const 1 - i32.sub - local.set $0 + local.set $4 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u + local.get $2 + local.get $4 + i32.lt_s if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - local.set $5 + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $4 - local.get $0 i32.const 2 i32.shl + local.get $3 i32.add - local.tee $2 i32.load - i32.store local.get $2 - local.get $5 - i32.store + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) + local.get $0 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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#forEach (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 + 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 + local.get $2 + i32.const 3 + i32.shl + local.get $3 + 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 + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) + local.get $0 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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 (param $0 f64) (param $1 i32) (param $2 i32) + local.get $0 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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#reverse (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 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + local.set $5 + local.get $2 + local.get $0 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $3 + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -9473,13 +9670,21 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.add @@ -9488,7 +9693,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Int8Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9499,7 +9704,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -9507,6 +9712,10 @@ 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 @@ -9526,12 +9735,12 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Int8Array#subarray local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Int8Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 8 i32.ne if @@ -9544,7 +9753,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 7 i32.ne if @@ -9557,7 +9766,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 6 i32.ne if @@ -9570,7 +9779,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 5 i32.ne if @@ -9590,14 +9799,62 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (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 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_u + local.set $5 + local.get $2 + local.get $0 + local.get $4 + i32.add + local.tee $2 + i32.load8_u + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/Uint8Array#subarray (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 @@ -9625,39 +9882,35 @@ i32.lt_s select end - local.set $1 + local.set $2 i32.const 12 - i32.const 9 + i32.const 4 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 + 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 local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 i32.gt_s select local.get $3 i32.sub - i32.const 2 - i32.shl i32.store offset=8 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -9667,11 +9920,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -9684,13 +9937,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.add @@ -9699,7 +9956,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Uint8Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9710,7 +9967,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -9718,6 +9975,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get + i32.const 255 + i32.and i32.ne if i32.const 0 @@ -9736,12 +9995,12 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Uint8Array#subarray local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Uint8Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 8 i32.ne if @@ -9754,7 +10013,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 7 i32.ne if @@ -9767,7 +10026,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 6 i32.ne if @@ -9780,7 +10039,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 5 i32.ne if @@ -9800,70 +10059,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (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 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i64.load - local.set $5 - local.get $2 - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i64.load - i64.store - local.get $2 - local.get $5 - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (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 @@ -9891,39 +10092,35 @@ i32.lt_s select end - local.set $1 + local.set $2 i32.const 12 - i32.const 10 + i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 + 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 local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 i32.gt_s select local.get $3 i32.sub - i32.const 3 - i32.shl i32.store offset=8 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -9933,11 +10130,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -9950,15 +10147,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.add @@ -9967,7 +10166,7 @@ end end local.get $2 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Uint8Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9978,7 +10177,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int64Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2800 local.get $1 i32.const 1 @@ -9986,8 +10185,9 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne + i32.const 255 + i32.and + i32.ne if i32.const 0 i32.const 1312 @@ -10005,14 +10205,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $1 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Uint8Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10023,9 +10223,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10036,9 +10236,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10049,9 +10249,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10069,18 +10269,74 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 i32) local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.const 1 + i32.shl + local.get $4 + i32.add + local.tee $2 + i32.load16_s + local.set $5 + local.get $2 + local.get $0 + i32.const 1 + i32.shl + local.get $4 + i32.add + local.tee $2 + i32.load16_s + i32.store16 + local.get $2 + local.get $5 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/Int16Array#subarray (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 @@ -10104,39 +10360,39 @@ i32.lt_s select end - local.set $1 + local.set $2 i32.const 12 - i32.const 11 + i32.const 6 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 local.get $0 i32.load offset=4 local.get $3 - i32.const 3 + i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $2 local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 i32.gt_s select local.get $3 i32.sub - i32.const 3 + i32.const 1 i32.shl i32.store offset=8 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10146,11 +10402,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10163,15 +10419,21 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.add @@ -10180,7 +10442,7 @@ end end local.get $2 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Int16Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10191,7 +10453,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint64Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10199,8 +10461,11 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.ne if i32.const 0 i32.const 1312 @@ -10218,14 +10483,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint64Array#subarray + call $~lib/typedarray/Int16Array#subarray local.tee $1 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Int16Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10236,9 +10501,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 7 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10249,9 +10514,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 6 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10262,9 +10527,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10282,12 +10547,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -10295,7 +10560,7 @@ local.set $4 local.get $3 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u i32.const 1 i32.sub @@ -10305,26 +10570,26 @@ local.get $0 i32.lt_u if - local.get $4 local.get $1 - i32.const 2 + i32.const 1 i32.shl + local.get $4 i32.add local.tee $2 - f32.load + i32.load16_u local.set $5 local.get $2 - local.get $4 local.get $0 - i32.const 2 + i32.const 1 i32.shl + local.get $4 i32.add local.tee $2 - f32.load - f32.store + i32.load16_u + i32.store16 local.get $2 local.get $5 - f32.store + i32.store16 local.get $1 i32.const 1 i32.add @@ -10338,13 +10603,13 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (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.const 1 i32.shr_u local.tee $2 i32.const 4 @@ -10373,39 +10638,39 @@ i32.lt_s select end - local.set $1 - i32.const 12 + local.set $2 i32.const 12 + i32.const 7 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 local.get $0 i32.load offset=4 local.get $3 - i32.const 2 + i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $2 local.get $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 i32.gt_s select local.get $3 i32.sub - i32.const 2 + i32.const 1 i32.shl i32.store offset=8 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10415,11 +10680,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10432,15 +10697,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.add @@ -10449,7 +10716,7 @@ end end local.get $2 - call $~lib/typedarray/Float32Array#reverse + call $~lib/typedarray/Uint16Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10460,7 +10727,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Float32Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10468,8 +10735,9 @@ local.get $0 i32.sub call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + i32.const 65535 + i32.and + i32.ne if i32.const 0 i32.const 1312 @@ -10487,14 +10755,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Float32Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $1 - call $~lib/typedarray/Float32Array#reverse + call $~lib/typedarray/Uint16Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 8 - f32.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10505,9 +10773,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 7 - f32.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10518,9 +10786,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 6 - f32.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10531,9 +10799,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10551,12 +10819,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -10564,7 +10832,7 @@ local.set $4 local.get $3 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.const 1 i32.sub @@ -10574,26 +10842,26 @@ local.get $0 i32.lt_u if - local.get $4 local.get $1 - i32.const 3 + i32.const 2 i32.shl + local.get $4 i32.add local.tee $2 - f64.load + i32.load local.set $5 local.get $2 - local.get $4 local.get $0 - i32.const 3 + i32.const 2 i32.shl + local.get $4 i32.add local.tee $2 - f64.load - f64.store + i32.load + i32.store local.get $2 local.get $5 - f64.store + i32.store local.get $1 i32.const 1 i32.add @@ -10607,7 +10875,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10617,11 +10885,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10634,15 +10902,13 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Int32Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -10651,7 +10917,7 @@ end end local.get $2 - call $~lib/typedarray/Float64Array#reverse + call $~lib/typedarray/Int32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10662,7 +10928,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10670,8 +10936,7 @@ local.get $0 i32.sub call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne + i32.ne if i32.const 0 i32.const 1312 @@ -10690,14 +10955,14 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Float64Array#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $1 - call $~lib/typedarray/Float64Array#reverse + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 8 - f64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 1312 @@ -10708,9 +10973,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 1312 @@ -10721,9 +10986,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 1312 @@ -10734,9 +10999,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 @@ -10754,870 +11019,1373 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 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 + 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 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf (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 + 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 - 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 + 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.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 (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.set $2 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $1 local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 local.get $1 local.get $2 - call $~lib/typedarray/Int8Array#lastIndexOf + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 + (local $4 i32) + (local $5 i32) + i32.const 2812 i32.load - local.tee $0 + local.tee $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $4 local.set $2 - local.get $0 - call $~lib/typedarray/Int8Array#constructor - local.tee $3 - local.set $0 + local.get $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $5 + local.set $3 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 2800 local.get $0 - local.get $1 - i32.const 2896 - 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 + call $~lib/typedarray/Uint32Array#__set + local.get $3 + local.get $0 + i32.const 2800 + 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 $0 - i32.const 0 + local.get $2 + call $~lib/typedarray/Int32Array#reverse + call $~lib/rt/pure/__release i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 2800 + 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 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end - local.get $0 - i32.const 11 + local.get $3 + i32.const 8 + call $~lib/typedarray/Uint32Array#subarray + local.tee $1 + call $~lib/typedarray/Int32Array#reverse + local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 + call $~lib/typedarray/Uint32Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 1312 - i32.const 558 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const -1 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 559 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 560 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - i32.const 2 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 + call $~lib/typedarray/Uint32Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 561 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#reverse (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 + local.get $3 + i32.load offset=8 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 562 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $2 + i64.load + local.set $5 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $2 + i64.load + i64.store + local.get $2 + local.get $5 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end + local.get $3 + ) + (func $~lib/typedarray/Int64Array#subarray (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 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 10 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne - if + 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 - i32.const 1312 - i32.const 564 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const -100 - call $~lib/typedarray/Int8Array#indexOf - i32.const 1 - i32.ne - if + local.get $1 i32.const 0 - i32.const 1312 - i32.const 565 - i32.const 3 - 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 - i32.const 1 - global.set $~argumentsLength + local.set $2 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 - i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline - if - i32.const 0 - i32.const 1312 - i32.const 567 - i32.const 3 - 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.const 1312 - i32.const 568 - i32.const 3 - 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 1312 - i32.const 569 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - 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 1312 - i32.const 570 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $1 local.get $0 + i32.load offset=4 + local.get $3 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + i32.shl + i32.add + i32.store offset=4 + local.get $1 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 571 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.shl + i32.store offset=8 + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + 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 2800 + 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 2800 + 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 $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 572 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 2800 + 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 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end end - local.get $0 - i32.const 3 - i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const -1 - i32.ne + local.get $3 + i32.const 8 + call $~lib/typedarray/Int64Array#subarray + local.tee $1 + call $~lib/typedarray/Int64Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 - i32.const 573 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 1 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 - i32.const 574 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 1 - i32.ne + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 - i32.const 575 + i32.const 531 i32.const 3 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 + i32.const 3 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 - i32.const 576 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) i32.const 4 - i32.const 9 - call $~lib/typedarray/Int8Array#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 1312 - i32.const 580 - i32.const 3 - 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 - call $~lib/typedarray/Int8Array#indexOf - if + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 1312 - i32.const 581 - i32.const 3 - 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 1312 - i32.const 582 - i32.const 3 - 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 1312 - i32.const 583 - i32.const 3 - 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 + local.get $1 i32.const 0 - i32.const 1312 - i32.const 584 - i32.const 3 - 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 - local.get $0 + local.set $2 + i32.const 12 i32.const 11 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 585 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/tlsf/__alloc + local.tee $1 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 1312 - i32.const 586 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $1 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 1312 - i32.const 587 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $1 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 + (local $4 i32) + (local $5 i32) + i32.const 2812 i32.load - local.tee $0 + local.tee $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $4 local.set $2 - local.get $0 - call $~lib/typedarray/Uint8Array#constructor - local.tee $3 - local.set $0 + local.get $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $5 + local.set $3 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 2800 local.get $0 - local.get $1 - i32.const 2896 - local.get $1 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $3 + local.get $0 + i32.const 2800 + 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 $1 + local.set $0 br $for-loop|0 end end - local.get $0 + 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 2800 + 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 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $3 + i32.const 8 + call $~lib/typedarray/Uint64Array#subarray + local.tee $1 + call $~lib/typedarray/Int64Array#reverse + local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Uint64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 - i32.const 557 + i32.const 529 i32.const 3 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 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 - i32.const 558 + i32.const 530 i32.const 3 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 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 - i32.const 559 + i32.const 531 i32.const 3 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 + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 - i32.const 560 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 3 - i32.const 2 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 - i32.ne + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + local.get $4 + i32.add + local.tee $2 + f32.load + local.set $5 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + local.get $4 + i32.add + local.tee $2 + f32.load + f32.store + local.get $2 + local.get $5 + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/Float32Array#subarray (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 $2 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $1 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + 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 2800 + 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 2800 + 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 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 2800 + 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 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $3 + i32.const 8 + call $~lib/typedarray/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 if i32.const 0 i32.const 1312 - i32.const 561 + i32.const 529 i32.const 3 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 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne if i32.const 0 i32.const 1312 - i32.const 562 + i32.const 530 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne if i32.const 0 i32.const 1312 - i32.const 563 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const 10 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne + i32.const 3 + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 1312 - i32.const 564 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release 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 1312 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline - if - i32.const 0 - i32.const 1312 - i32.const 567 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) local.get $0 - i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 568 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + i32.const 3 + i32.shr_u 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 1312 - i32.const 569 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $2 + f64.load + local.set $5 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + local.tee $2 + f64.load + f64.store + local.get $2 + local.get $5 + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end - i32.const 1 - 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 1312 - i32.const 570 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $3 + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + 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 2800 + 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 2800 + 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 $0 - i32.const 3 + local.get $2 + call $~lib/typedarray/Float64Array#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/Float64Array#__get + i32.const 2800 + 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 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 3 - i32.ne + 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 if i32.const 0 i32.const 1312 - i32.const 571 + i32.const 529 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 3 - i32.ne + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne if i32.const 0 i32.const 1312 - i32.const 572 + i32.const 530 i32.const 3 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 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne if i32.const 0 i32.const 1312 - i32.const 573 + i32.const 531 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf - i32.const 1 - i32.ne + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 1312 - i32.const 574 + i32.const 532 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 1 - i32.const -10 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#indexOf (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 (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 (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 - i32.const 1 - i32.ne + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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 1312 - i32.const 575 + i32.const 557 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if i32.const 0 i32.const 1312 - i32.const 576 + i32.const 558 i32.const 3 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 -1 i32.const 0 call $~lib/typedarray/Int8Array#indexOf i32.const -1 @@ -11625,113 +12393,357 @@ if i32.const 0 i32.const 1312 - i32.const 580 + i32.const 559 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 4 + i32.const 3 i32.const 0 call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 581 + i32.const 560 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 - i32.const 0 + i32.const 3 + i32.const 2 call $~lib/typedarray/Int8Array#indexOf - i32.const 1 + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 582 + i32.const 561 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 9 - i32.const 0 + i32.const 3 + i32.const 3 call $~lib/typedarray/Int8Array#indexOf - i32.const -1 + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 583 + i32.const 562 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 10 - i32.const 0 + i32.const 3 + i32.const 4 call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if i32.const 0 i32.const 1312 - i32.const 584 + i32.const 563 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 11 - i32.const 0 + i32.const 1 + i32.const 10 call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if i32.const 0 i32.const 1312 - i32.const 585 + i32.const 564 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 i32.const 1 + i32.const -100 call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if i32.const 0 i32.const 1312 - i32.const 586 + i32.const 565 i32.const 3 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.const 5 - i32.const 2 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne + i32.const 0 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 - i32.const 587 + i32.const 567 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + i32.const 1 + global.set $~argumentsLength local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> + i32.const 11 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 568 + i32.const 3 + 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 1312 + i32.const 569 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + 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 1312 + i32.const 570 + i32.const 3 + call $~lib/builtins/abort + unreachable + 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 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + 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 1312 + i32.const 572 + i32.const 3 + 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 1312 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 574 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + 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 1312 + i32.const 575 + i32.const 3 + 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 1312 + i32.const 576 + i32.const 3 + 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 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 580 + i32.const 3 + 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 1312 + i32.const 581 + i32.const 3 + 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 1312 + i32.const 582 + i32.const 3 + 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 1312 + i32.const 583 + i32.const 3 + 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 1312 + i32.const 584 + i32.const 3 + 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 1312 + i32.const 585 + i32.const 3 + 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 1312 + i32.const 586 + i32.const 3 + 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 1312 + i32.const 587 + i32.const 3 + 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/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -11741,7 +12753,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -11756,7 +12768,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 i32.add @@ -12032,7 +13044,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Uint8Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -12148,157 +13160,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (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 (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 (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> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -12308,7 +13170,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12321,11 +13183,9 @@ i32.const 2896 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 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.add @@ -12336,7 +13196,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -12348,7 +13208,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12362,7 +13222,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12376,7 +13236,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12390,7 +13250,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12404,7 +13264,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 3 i32.ne if @@ -12418,7 +13278,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12432,7 +13292,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12446,7 +13306,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12461,7 +13321,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 @@ -12474,7 +13334,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -12489,7 +13349,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -12504,7 +13364,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -12518,7 +13378,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12532,7 +13392,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 3 i32.ne if @@ -12546,7 +13406,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12560,7 +13420,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12574,7 +13434,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const 1 i32.ne if @@ -12588,7 +13448,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int8Array#lastIndexOf i32.const -1 i32.ne if @@ -12601,11 +13461,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12619,7 +13479,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 @@ -12631,7 +13491,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12645,7 +13505,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12659,7 +13519,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12673,7 +13533,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12687,7 +13547,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const 1 i32.ne if @@ -12701,7 +13561,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int8Array#indexOf i32.const -1 i32.ne if @@ -12717,32 +13577,184 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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/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 $0 - local.get $1 - i32.const 2896 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + 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 $2 + i32.const 1 + i32.shl + local.get $0 + 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 (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 $2 + i32.const 1 + i32.shl + local.get $0 + 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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2896 + 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 $1 i32.const 1 i32.add @@ -13018,7 +14030,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Int16Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -13134,187 +14146,43 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + (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 2908 + 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.const 0 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 + i32.const 2896 + local.get $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__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 (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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - 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 2896 - 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 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 1312 @@ -13326,7 +14194,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13340,7 +14208,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13354,7 +14222,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13368,7 +14236,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13382,7 +14250,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13396,7 +14264,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13410,7 +14278,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13424,7 +14292,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13439,7 +14307,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 @@ -13452,7 +14320,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13467,7 +14335,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13482,7 +14350,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -13496,7 +14364,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13510,7 +14378,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13524,7 +14392,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13538,7 +14406,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13552,7 +14420,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13566,7 +14434,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13578,13 +14446,12 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13598,7 +14465,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 1312 @@ -13610,7 +14477,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13624,7 +14491,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13638,7 +14505,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13652,7 +14519,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13666,7 +14533,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13680,7 +14547,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13696,60 +14563,206 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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/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 2896 - 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 $2 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load + local.get $1 + 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/Int32Array#indexOf - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - 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 1312 - i32.const 558 - i32.const 3 + local.get $2 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf (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 $2 + i32.const 2 + i32.shl + local.get $0 + i32.add + i32.load + local.get $1 + 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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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 1312 + i32.const 557 + i32.const 3 + 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 1312 + i32.const 558 + i32.const 3 call $~lib/builtins/abort unreachable end @@ -13994,8 +15007,9 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -14111,189 +15125,42 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> + (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 2908 + 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 2896 + 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 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 + local.set $1 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 - ) - (func $~lib/typedarray/Int64Array#lastIndexOf (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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - 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 2896 - 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 + local.get $0 + i32.const 0 + i32.const 0 + call $~lib/typedarray/Int32Array#indexOf + if i32.const 0 i32.const 1312 i32.const 557 @@ -14302,9 +15169,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14316,9 +15183,9 @@ unreachable end local.get $0 - i64.const -1 + i32.const -1 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14330,9 +15197,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14344,9 +15211,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14358,9 +15225,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + i32.const 3 + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14372,9 +15239,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14386,9 +15253,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14400,9 +15267,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14416,8 +15283,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + i32.const 0 + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 @@ -14429,8 +15296,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + i32.const 11 + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14444,8 +15311,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + i32.const -1 + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14459,8 +15326,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + i32.const 3 + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -14472,9 +15339,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14486,9 +15353,9 @@ unreachable end local.get $0 - i64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + i32.const 3 + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14500,9 +15367,9 @@ unreachable end local.get $0 - i64.const 3 + i32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14514,9 +15381,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14528,9 +15395,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14542,9 +15409,9 @@ unreachable end local.get $0 - i64.const 1 + i32.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14557,11 +15424,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Uint32Array#subarray local.tee $0 - i64.const 3 + i32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14573,9 +15440,9 @@ unreachable end local.get $0 - i64.const 4 + i32.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 1312 @@ -14585,9 +15452,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14599,9 +15466,9 @@ unreachable end local.get $0 - i64.const 9 + i32.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14613,9 +15480,9 @@ unreachable end local.get $0 - i64.const 10 + i32.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14627,9 +15494,9 @@ unreachable end local.get $0 - i64.const 11 + i32.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14641,9 +15508,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14655,9 +15522,9 @@ unreachable end local.get $0 - i64.const 5 + i32.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14673,43 +15540,189 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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/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 2896 - 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 - end - local.get $0 - i64.const 0 - i32.const 0 - call $~lib/typedarray/Int64Array#indexOf - if + 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 $2 + i32.const 3 + i32.shl + local.get $0 + i32.add + i64.load + local.get $1 + 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 (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 $2 + i32.const 3 + i32.shl + local.get $0 + i32.add + i64.load + local.get $1 + 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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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 1312 i32.const 557 @@ -14973,7 +15986,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint64Array#subarray + call $~lib/typedarray/Int64Array#subarray local.tee $0 i64.const 3 i32.const 0 @@ -15089,188 +16102,42 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - 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 + i32.const 2908 + 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 + local.get $0 + local.get $1 + i32.const 2896 + 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.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 $2 - ) - (func $~lib/typedarray/Float32Array#lastIndexOf (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 - 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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - 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 2896 - 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 + local.set $1 + br $for-loop|0 end end local.get $0 - f32.const 0 + i64.const 0 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 1312 @@ -15280,9 +16147,9 @@ unreachable end local.get $0 - f32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15294,9 +16161,9 @@ unreachable end local.get $0 - f32.const -1 + i64.const -1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15308,9 +16175,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15322,9 +16189,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15336,9 +16203,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15350,9 +16217,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15364,9 +16231,9 @@ unreachable end local.get $0 - f32.const 1 + i64.const 1 i32.const 10 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15378,9 +16245,9 @@ unreachable end local.get $0 - f32.const 1 + i64.const 1 i32.const -100 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15394,8 +16261,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 0 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 @@ -15407,8 +16274,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 11 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15422,8 +16289,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const -1 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15437,8 +16304,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -15450,9 +16317,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15464,9 +16331,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15478,9 +16345,9 @@ unreachable end local.get $0 - f32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15492,9 +16359,9 @@ unreachable end local.get $0 - f32.const 1 + i64.const 1 i32.const 100 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15506,9 +16373,9 @@ unreachable end local.get $0 - f32.const 1 + i64.const 1 i32.const -10 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15520,9 +16387,9 @@ unreachable end local.get $0 - f32.const 1 + i64.const 1 i32.const -11 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15535,11 +16402,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Float32Array#subarray + call $~lib/typedarray/Uint64Array#subarray local.tee $0 - f32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15551,9 +16418,9 @@ unreachable end local.get $0 - f32.const 4 + i64.const 4 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 1312 @@ -15563,9 +16430,9 @@ unreachable end local.get $0 - f32.const 5 + i64.const 5 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15577,9 +16444,9 @@ unreachable end local.get $0 - f32.const 9 + i64.const 9 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15591,9 +16458,9 @@ unreachable end local.get $0 - f32.const 10 + i64.const 10 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15605,9 +16472,9 @@ unreachable end local.get $0 - f32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15619,9 +16486,9 @@ unreachable end local.get $0 - f32.const 5 + i64.const 5 i32.const 1 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15633,9 +16500,9 @@ unreachable end local.get $0 - f32.const 5 + i64.const 5 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15651,12 +16518,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|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) @@ -15669,7 +16536,7 @@ if i32.const -1 local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end local.get $2 i32.const 0 @@ -15694,15 +16561,15 @@ local.get $3 i32.lt_s if - local.get $0 local.get $2 - i32.const 3 + i32.const 2 i32.shl + local.get $0 i32.add - f64.load + f32.load local.get $1 - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + f32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 i32.const 1 i32.add @@ -15715,19 +16582,19 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|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/Float64Array,f64>|inlined.0 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end local.get $2 local.get $3 @@ -15753,15 +16620,15 @@ i32.const 0 i32.ge_s if - local.get $0 local.get $2 - i32.const 3 + i32.const 2 i32.shl + local.get $0 i32.add - f64.load + f32.load local.get $1 - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + f32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 i32.const 1 i32.sub @@ -15774,7 +16641,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15788,16 +16655,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/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -15807,7 +16674,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15820,8 +16687,8 @@ i32.const 2896 local.get $1 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $1 i32.const 1 i32.add @@ -15830,9 +16697,9 @@ end end local.get $0 - f64.const 0 + f32.const 0 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf if i32.const 0 i32.const 1312 @@ -15842,9 +16709,9 @@ unreachable end local.get $0 - f64.const 11 + f32.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15856,9 +16723,9 @@ unreachable end local.get $0 - f64.const -1 + f32.const -1 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15870,9 +16737,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15884,9 +16751,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15898,9 +16765,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15912,9 +16779,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15926,9 +16793,9 @@ unreachable end local.get $0 - f64.const 1 + f32.const 1 i32.const 10 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15940,9 +16807,9 @@ unreachable end local.get $0 - f64.const 1 + f32.const 1 i32.const -100 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -15956,8 +16823,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + f32.const 0 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline if i32.const 0 i32.const 1312 @@ -15969,8 +16836,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + f32.const 11 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15984,8 +16851,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const -1 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + f32.const -1 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15999,8 +16866,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f64.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + f32.const 3 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -16012,9 +16879,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -16026,9 +16893,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -16040,9 +16907,9 @@ unreachable end local.get $0 - f64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -16054,9 +16921,9 @@ unreachable end local.get $0 - f64.const 1 + f32.const 1 i32.const 100 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -16068,9 +16935,9 @@ unreachable end local.get $0 - f64.const 1 + f32.const 1 i32.const -10 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -16082,9 +16949,9 @@ unreachable end local.get $0 - f64.const 1 + f32.const 1 i32.const -11 - call $~lib/typedarray/Float64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -16096,13 +16963,12 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Float64Array#subarray + call $~lib/typedarray/Float32Array#subarray local.tee $0 - f64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16114,9 +16980,9 @@ unreachable end local.get $0 - f64.const 4 + f32.const 4 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf if i32.const 0 i32.const 1312 @@ -16126,9 +16992,9 @@ unreachable end local.get $0 - f64.const 5 + f32.const 5 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -16140,9 +17006,9 @@ unreachable end local.get $0 - f64.const 9 + f32.const 9 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16154,9 +17020,9 @@ unreachable end local.get $0 - f64.const 10 + f32.const 10 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16168,9 +17034,9 @@ unreachable end local.get $0 - f64.const 11 + f32.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16182,9 +17048,9 @@ unreachable end local.get $0 - f64.const 5 + f32.const 5 i32.const 1 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -16196,9 +17062,9 @@ unreachable end local.get $0 - f64.const 5 + f32.const 5 i32.const 2 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16214,1139 +17080,689 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount32 (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 (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result 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 + 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 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 2944 - return - end - local.get $0 - i32.const 31 - i32.shr_u - 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.sub + i32.load offset=4 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 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + i32.const 3 + i32.shl + local.get $0 + 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 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#get:length (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 (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 + (func $~lib/typedarray/Float64Array#lastIndexOf (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.const 45 - i32.store16 - i32.const 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 $2 + i32.const 3 + i32.shl + local.get $0 + 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 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 10 - i32.lt_u - if + ) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (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 - 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 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 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 + local.get $2 + call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 0 + i32.const 2908 + i32.load + local.tee $0 + local.set $2 local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select + call $~lib/typedarray/Float64Array#constructor local.tee $3 - local.get $1 + 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 2896 + 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 - local.get $1 + call $~lib/typedarray/Float64Array#indexOf + if + i32.const 0 + i32.const 1312 + i32.const 557 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64.const 11 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 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 558 + i32.const 3 + call $~lib/builtins/abort + unreachable end + local.get $0 + f64.const -1 i32.const 0 - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne if - local.get $0 - call $~lib/rt/pure/__retain - return + i32.const 0 + i32.const 1312 + i32.const 559 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 (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 + f64.const 3 i32.const 0 - i32.lt_s + call $~lib/typedarray/Float64Array#indexOf + i32.const 3 + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 560 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + local.get $0 + f64.const 3 + i32.const 2 + call $~lib/typedarray/Float64Array#indexOf + i32.const 3 + i32.ne if - local.get $0 - i32.load8_s - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 2976 - 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 $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - 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 $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + i32.const 0 + i32.const 1312 + i32.const 561 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - 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 $2 - i32.add - local.tee $0 - i32.gt_s + f64.const 3 + i32.const 3 + call $~lib/typedarray/Float64Array#indexOf + i32.const 3 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Int8Array#join (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 (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 + f64.const 3 i32.const 4 - i32.ge_u - select + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne 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 + i32.const 0 + i32.const 1312 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 + 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 1312 + i32.const 564 + i32.const 3 + call $~lib/builtins/abort + unreachable end - i32.const 0 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) local.get $0 - local.get $1 - i32.eq + f64.const 1 + i32.const -100 + call $~lib/typedarray/Float64Array#indexOf + i32.const 1 + i32.ne if - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 565 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 - end - i32.const 0 - ) - (func $~lib/util/number/utoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.eqz + f64.const 0 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline if - i32.const 2944 - return + i32.const 0 + i32.const 1312 + i32.const 567 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.set $~argumentsLength 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 + f64.const 11 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + i32.const -1 + i32.ne if - local.get $0 - local.get $2 - i32.const 255 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 568 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 (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 2928 - return - end - local.get $3 - i32.eqz + global.set $~argumentsLength + local.get $0 + f64.const -1 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + i32.const -1 + i32.ne if - local.get $0 - i32.load8_u - call $~lib/util/number/utoa32 - return + i32.const 0 + i32.const 1312 + i32.const 569 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 2976 - 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 $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - 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 $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $1 - local.get $2 + global.set $~argumentsLength local.get $0 - local.get $3 - i32.add - i32.load8_u - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + f64.const 3 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + i32.const 3 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 570 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Uint8Array#join (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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + f64.const 3 + i32.const 4 + call $~lib/typedarray/Float64Array#lastIndexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable + end 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 + f64.const 3 + i32.const 3 + call $~lib/typedarray/Float64Array#lastIndexOf + i32.const 3 + i32.ne if - local.get $0 - i32.const 45 - i32.store16 i32.const 0 - local.get $2 - i32.sub - local.set $2 + i32.const 1312 + i32.const 572 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 10 - i32.lt_u + local.get $0 + f64.const 3 + i32.const 2 + call $~lib/typedarray/Float64Array#lastIndexOf + i32.const -1 + i32.ne 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 + i32.const 0 + i32.const 1312 + i32.const 573 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 (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 + f64.const 1 + i32.const 100 + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 574 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + local.get $0 + f64.const 1 + i32.const -10 + call $~lib/typedarray/Float64Array#lastIndexOf + i32.const 1 + i32.ne if - local.get $0 - i32.load16_s - call $~lib/util/number/itoa32 - return + i32.const 0 + i32.const 1312 + i32.const 575 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 2976 - 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 $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - 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 1312 + i32.const 576 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - local.get $1 - local.get $2 local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add + i32.const 4 + i32.const 9 + call $~lib/typedarray/Float64Array#subarray local.tee $0 - i32.gt_s + f64.const 3 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + i32.const 0 + i32.const 1312 + i32.const 580 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $1 - ) - (func $~lib/typedarray/Int16Array#join (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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + f64.const 4 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + if + i32.const 0 + i32.const 1312 + i32.const 581 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $1 + f64.const 5 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u + i32.ne if - local.get $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return + i32.const 0 + i32.const 1312 + i32.const 582 + i32.const 3 + call $~lib/builtins/abort + unreachable 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 (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 + f64.const 9 i32.const 0 - i32.lt_s + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne if - i32.const 2928 - return + i32.const 0 + i32.const 1312 + i32.const 583 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + local.get $0 + f64.const 10 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne if - local.get $0 - i32.load16_u - call $~lib/util/number/utoa32 - return + i32.const 0 + i32.const 1312 + i32.const 584 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 + 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 1312 + i32.const 585 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64.const 5 i32.const 1 - i32.shl + call $~lib/typedarray/Float64Array#indexOf i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 586 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $6 - local.get $1 - local.get $2 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 1312 + i32.const 587 + i32.const 3 + 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 (param $0 i32) (result i32) + local.get $0 + i32.const 10 + i32.ge_u i32.const 1 - i32.shl i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $2 + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 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/Uint16Array#join (param $0 i32) (result i32) local.get $0 - i32.load offset=4 + i32.const 1000 + i32.ge_u + i32.add local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 100 + i32.lt_u + select local.get $0 - local.get $1 - i32.const 1 - i32.shl + i32.const 1000000 + i32.ge_u + i32.const 6 i32.add - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - local.tee $1 - if + 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 (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 - i32.const 45 - i32.store16 - i32.const 0 local.get $2 + i32.const 1 i32.sub - local.set $2 - end - local.get $2 - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $1 + local.tee $2 i32.const 1 i32.shl i32.add - local.get $2 + local.get $3 i32.const 48 - i32.or + i32.add i32.store16 local.get $1 - i32.const 1 - i32.add - return + br_if $do-continue|0 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 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/number/itoa32 (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 $1 - i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s + local.get $0 + i32.eqz if - i32.const 2928 + i32.const 2944 return end - local.get $3 - i32.eqz + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 if + i32.const 0 local.get $0 - i32.load - call $~lib/util/number/itoa32 - return + i32.sub + local.set $0 end - local.get $3 - i32.const 2976 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 + local.get $0 + call $~lib/util/number/decimalCount32 + local.get $1 i32.add - local.tee $6 + local.tee $3 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 $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $1 - local.get $2 + local.tee $2 local.get $0 local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s + call $~lib/util/number/utoa_simple + local.get $1 if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return + local.get $2 + i32.const 45 + i32.store16 end - local.get $1 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#join (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 + (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 - i32.load offset=8 - i32.const 2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 i32.shr_u - call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17354,26 +17770,139 @@ 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 $0 - local.get $2 local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.tee $2 call $~lib/util/number/decimalCount32 - local.tee $0 + 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 (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 2928 + 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 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17393,18 +17922,18 @@ i32.eqz if local.get $0 - i32.load - call $~lib/util/number/utoa32 + i32.load8_s + call $~lib/util/number/itoa32 return end local.get $3 i32.const 2976 call $~lib/string/String#get:length local.tee $4 - i32.const 10 + i32.const 11 i32.add i32.mul - i32.const 10 + i32.const 11 i32.add local.tee $6 i32.const 1 @@ -17422,11 +17951,9 @@ local.get $2 local.get $0 local.get $5 - i32.const 2 - i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 @@ -17459,11 +17986,9 @@ local.get $2 local.get $0 local.get $3 - i32.const 2 - i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -17478,251 +18003,213 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#join (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 + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount64High (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 + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) local.get $0 - i64.const 1000000000000000 - i64.lt_u + 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 - ) - (func $~lib/util/number/utoa_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 - local.get $0 + 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.tee $2 - i32.const 1 - i32.shl - i32.add + local.set $2 local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - i64.const 0 - i64.ne - br_if $do-continue|0 + 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/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 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 + i32.eq if - local.get $1 - i32.const 45 - i32.store16 - i64.const 0 - local.get $2 - i64.sub - local.set $2 + i32.const 1 + return end - local.get $2 - i64.const 10 - i64.lt_u - if + block $folding-inner0 local.get $1 - local.get $0 + i32.eqz 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 + select + br_if $folding-inner0 local.get $0 - i32.add - local.set $0 + call $~lib/string/String#get:length + local.tee $2 local.get $1 - local.get $3 + call $~lib/string/String#get:length + i32.ne + br_if $folding-inner0 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 + call $~lib/util/string/compareImpl + i32.eqz + return end - local.get $0 + i32.const 0 ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/number/utoa32 (param $0 i32) (result i32) + (local $1 i32) (local $2 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 $4 - i32.const 0 - i32.lt_s + local.get $0 + i32.eqz if - i32.const 2928 + i32.const 2944 return end - local.get $4 - i32.eqz - if - block $__inlined_func$~lib/util/number/itoa64 (result i32) - i32.const 2944 - local.get $0 - i64.load - local.tee $3 - i64.eqz - br_if $__inlined_func$~lib/util/number/itoa64 - drop - local.get $3 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 - 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/decimalCount64High - 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 + 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 (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 $4 + 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 (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 2928 + 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 2976 call $~lib/string/String#get:length - local.tee $5 - i32.const 21 + local.tee $4 + i32.const 10 i32.add i32.mul - i32.const 21 + i32.const 10 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -17730,23 +18217,21 @@ call $~lib/rt/pure/__retain 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 $1 local.get $2 local.get $0 - local.get $6 - i32.const 3 - i32.shl + local.get $5 i32.add - i64.load - call $~lib/util/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $5 + local.get $4 if local.get $1 local.get $2 @@ -17754,32 +18239,30 @@ i32.shl i32.add i32.const 2976 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $4 i32.add local.set $2 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 $1 local.get $2 local.get $0 - local.get $4 - i32.const 3 - i32.shl + local.get $3 i32.add - i64.load - call $~lib/util/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -17794,17 +18277,14 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#join (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/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17812,47 +18292,70 @@ i32.add local.set $0 local.get $2 - i64.const 10 - i64.lt_u + 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 - i64.const 48 - i64.or - i64.store16 - i32.const 1 - return + i32.sub + local.set $2 end local.get $2 - i64.const 4294967295 - i64.le_u + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 10 + i32.lt_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 + i32.const 1 + i32.shl + i32.add local.get $2 - call $~lib/util/number/decimalCount64High - local.tee $1 - call $~lib/util/number/utoa_simple + 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 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (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 @@ -17866,59 +18369,170 @@ local.get $3 i32.eqz if - block $__inlined_func$~lib/util/number/utoa64 (result i32) - i32.const 2944 - 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 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 + local.get $0 + i32.load16_s + call $~lib/util/number/itoa32 + return + end + local.get $3 + i32.const 2976 + 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 $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $2 + local.get $0 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 + if 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.add + i32.const 2976 + local.get $4 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 + i32.shl + call $~lib/memory/memory.copy + local.get $2 local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple + i32.add + local.set $2 end - local.get $0 - call $~lib/rt/pure/__retain + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end + end + local.get $6 + local.get $1 + local.get $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + 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/Int16Array#join (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 (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 (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 2928 + 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 2976 call $~lib/string/String#get:length - local.tee $5 - i32.const 20 + local.tee $4 + i32.const 10 i32.add i32.mul - i32.const 20 + i32.const 10 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -17926,23 +18540,23 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 + local.get $5 local.get $3 i32.lt_s if local.get $1 local.get $2 local.get $0 - local.get $6 - i32.const 3 + local.get $5 + i32.const 1 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $5 + local.get $4 if local.get $1 local.get $2 @@ -17950,32 +18564,32 @@ i32.shl i32.add i32.const 2976 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $4 i32.add local.set $2 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 $1 local.get $2 local.get $0 local.get $3 - i32.const 3 + i32.const 1 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -17990,1106 +18604,554 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (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) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - local.get $3 + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - i64.sub - local.set $9 - local.get $3 - i64.const 1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 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 $12 - i64.and - local.set $8 - 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.lt_s + local.tee $1 + if + local.get $0 + i32.const 45 + i32.store16 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 - local.tee $2 - i32.const 10 - i32.ne - if - 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 - end - local.get $7 - i32.const 1000000000 - i32.div_u - local.set $2 - 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 $2 - 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 $2 - 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 $2 - 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 $2 - 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 $2 - 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 $2 - 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 $2 - 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 $2 - local.get $7 - i32.const 10 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - local.set $2 - i32.const 0 - local.set $7 - br $break|1 - end - i32.const 0 - local.set $2 - end + 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 (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 2928 + 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 2976 + 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 $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $1 local.get $2 - local.get $6 - i32.or + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 if - local.get $0 - local.get $6 - i32.const 1 - i32.shl - i32.add + local.get $1 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 $8 - 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 4112 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 2976 + local.get $4 i32.const 1 i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 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 + local.set $2 end - br $while-continue|0 - end - end - local.get $10 - i64.extend_i32_s - local.set $13 - loop $while-continue|4 (result i32) - local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $8 - i64.const 10 - i64.mul - local.tee $3 - local.get $13 - i64.shr_u - local.tee $1 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $0 - local.get $6 - 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.get $6 + local.get $5 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 $12 - i64.and - local.tee $8 - 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 $8 - local.set $1 - local.get $9 - i32.const 0 - local.get $4 - i32.sub - i32.const 2 - i32.shl - i32.const 4112 - 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 + local.set $5 + br $for-loop|0 end - local.get $2 - local.get $4 - i32.store16 - local.get $6 end - ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + local.get $6 + local.get $1 local.get $2 - i32.eqz + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s if - local.get $0 local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store + local.get $0 + call $~lib/string/String#substring local.get $1 - i32.const 2 - i32.add + call $~lib/rt/pure/__release return end local.get $1 + ) + (func $~lib/typedarray/Int32Array#join (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 $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 local.get $1 - local.get $2 + i32.const 1 + i32.shl 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.set $0 + local.get $2 + i32.const 10 + i32.lt_u + if local.get $0 - local.get $3 + local.get $2 + i32.const 48 + i32.or + i32.store16 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 + 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 (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 2928 + 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 2976 + 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 $1 + loop $for-loop|0 + local.get $5 local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) + i32.lt_s + if + local.get $1 + local.get $2 local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 + local.get $5 i32.const 2 + i32.shl i32.add - local.get $0 - i32.const 0 + i32.load + call $~lib/util/number/itoa_stream 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 + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + i32.const 2976 + local.get $4 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 + local.get $2 + local.get $4 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 - local.tee $1 - i32.const 4 - i32.add - 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 offset=4 - 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 - local.tee $2 - i32.const 4 - i32.add - 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 offset=4 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end + local.set $2 end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end end - ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $8 - 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 $3 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.tee $6 - 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 $3 - local.get $3 - i64.clz - i32.wrap_i64 - local.tee $4 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus local.get $6 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $6 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 + local.get $1 local.get $2 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 i32.add - local.tee $9 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $6 - local.get $9 - i32.sub - local.get $4 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $4 - 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 $4 - local.get $4 - f64.convert_i32_s + 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 - f64.ne + ) + (func $~lib/typedarray/Uint32Array#join (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 $~lib/util/number/decimalCount64High (param $0 i64) (result i32) + local.get $0 + i64.const 100000000000 + i64.ge_u + i32.const 10 i32.add - i32.const 3 - i32.shr_s - i32.const 1 + local.get $0 + i64.const 10000000000 + i64.ge_u i32.add - local.tee $4 - i32.const 3 - i32.shl - local.tee $9 - i32.sub - global.set $~lib/util/number/_K - local.get $9 - i32.const 3200 + local.get $0 + i64.const 100000000000000 + i64.ge_u + i32.const 13 i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $4 - i32.const 1 - i32.shl - i32.const 3920 + local.get $0 + i64.const 10000000000000 + i64.ge_u 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 $5 local.get $0 - local.get $8 + 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 (param $0 i32) (param $1 i64) (param $2 i32) + (local $3 i32) + loop $do-continue|0 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 + local.set $3 + local.get $1 + i64.const 10 + i64.div_u + local.set $1 + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + i32.const 48 + i32.add + i32.store16 + local.get $1 + i64.const 0 + i64.ne + br_if $do-continue|0 + end + ) + (func $~lib/util/number/itoa_stream (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.get $0 - local.get $2 + local.set $1 local.get $2 - i64.clz - i32.wrap_i64 + i64.const 0 + i64.lt_s local.tee $0 - i64.extend_i32_s - i64.shl - local.tee $2 - i64.const 32 - i64.shr_u - local.tee $7 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $10 - i64.mul - local.get $5 - local.get $7 - i64.mul + 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 4294967295 - i64.and - local.tee $2 - local.get $5 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $10 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $4 - local.get $6 - 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 - local.tee $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $10 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $10 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $5 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $5 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.sub - local.tee $2 - local.get $4 - global.get $~lib/util/number/_exp - i32.add - 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 $5 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $5 - i64.mul - local.get $2 - i64.const 4294967295 - i64.and - local.tee $2 - local.get $3 - i64.mul - i64.const 32 - i64.shr_u - i64.add - local.tee $3 - i64.const 32 - i64.shr_u - i64.add - local.get $2 - local.get $7 - i64.mul - local.get $3 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - i64.add - i64.const 1 - i64.add - i64.sub - local.get $8 - call $~lib/util/number/genDigits - local.get $8 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $8 - i32.add - ) - (func $~lib/util/number/dtoa (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq + i64.const 10 + i64.lt_u if - i32.const 3056 + 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 $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne + 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 - f64.ne - if - i32.const 3088 - return - end - i32.const 3120 - i32.const 3168 + call $~lib/util/number/utoa_simple + else + local.get $1 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64High local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple 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 (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - local.get $0 + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i64) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - f64.const 0 - f64.eq + i32.sub + local.tee $4 + i32.const 0 + i32.lt_s 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 + i32.const 2928 return end - local.get $2 - local.get $2 - f64.sub - f64.const 0 - f64.ne + local.get $4 + i32.eqz 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 + block $__inlined_func$~lib/util/number/itoa64 (result i32) + i32.const 2944 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 + i64.load + local.tee $3 + i64.eqz + br_if $__inlined_func$~lib/util/number/itoa64 + drop + local.get $3 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.tee $0 + if + i64.const 0 + local.get $3 + i64.sub + local.set $3 + end + local.get $3 + 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.const 45 - i32.store16 + 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/decimalCount64High local.get $0 - i32.const 2 i32.add - local.set $0 + 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 - i64.const 29555310648492105 - i64.store - local.get $0 - i64.const 34058970405077102 - i64.store offset=8 + if + local.get $1 + i32.const 45 + i32.store16 + end local.get $1 - i32.const 8 - i32.add - return + call $~lib/rt/pure/__retain end - unreachable - end - local.get $0 - local.get $2 - call $~lib/util/number/dtoa_core - ) - (func $~lib/util/string/joinFloatArray (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 2928 - 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 + local.get $4 i32.const 2976 call $~lib/string/String#get:length - local.tee $4 - i32.const 28 + local.tee $5 + i32.const 21 i32.add i32.mul - i32.const 28 + i32.const 21 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -19097,24 +19159,23 @@ call $~lib/rt/pure/__retain 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 $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 + i64.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $4 + local.get $5 if local.get $1 local.get $2 @@ -19122,33 +19183,32 @@ i32.shl i32.add i32.const 2976 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $4 + local.get $5 i32.add 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 $7 local.get $1 local.get $2 local.get $0 - local.get $3 - i32.const 2 + local.get $4 + i32.const 3 i32.shl i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -19163,21 +19223,65 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (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/joinFloatArray + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/number/itoa_stream (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 (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 @@ -19191,21 +19295,59 @@ local.get $3 i32.eqz if - local.get $0 - f64.load - call $~lib/util/number/dtoa + block $__inlined_func$~lib/util/number/utoa64 (result i32) + i32.const 2944 + 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 + 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 2976 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 @@ -19213,23 +19355,23 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $1 local.get $2 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add - f64.load - call $~lib/util/number/dtoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $4 + local.get $5 if local.get $1 local.get $2 @@ -19237,23 +19379,23 @@ i32.shl i32.add i32.const 2976 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $4 + local.get $5 i32.add 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 $7 local.get $1 local.get $2 local.get $0 @@ -19261,8 +19403,8 @@ i32.const 3 i32.shl i32.add - f64.load - call $~lib/util/number/dtoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -19277,2067 +19419,1664 @@ end local.get $1 ) - (func $~lib/typedarray/Float64Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (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 $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - i32.const 1040 - i32.const 1088 - i32.const 54 - i32.const 43 - 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 + call $~lib/util/string/joinIntegerArray ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (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 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 0 - 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 1040 - i32.const 1440 - i32.const 1750 - i32.const 7 - 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 1040 - i32.const 1440 - i32.const 1755 - i32.const 7 - 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 + (func $~lib/util/number/genDigits (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) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i64) local.get $3 - 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 (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 + i64.sub + local.set $9 + local.get $3 + i64.const 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 + local.get $4 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.tee $10 + i64.extend_i32_s + i64.shl + local.tee $11 + i64.const 1 + i64.sub + local.tee $12 + i64.and + local.set $8 local.get $3 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - i32.load - local.tee $4 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - local.set $2 - loop $for-loop|0 - local.get $0 + 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.lt_s - if - local.get $2 - local.get $0 - i32.const 4304 - 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 - i32.load - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - 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 16 - i32.sub - i32.load offset=12 - local.tee $1 - local.set $6 - i32.const 0 - local.get $1 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - 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 $6 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s + 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 + local.tee $2 + i32.const 10 + i32.ne + if + 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 + end + local.get $7 + i32.const 1000000000 + i32.div_u + local.set $2 + 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 $2 + 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 $2 + 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 $2 + 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 $2 + 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 $2 + 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 $2 + 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 $2 + 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 $2 + local.get $7 + i32.const 10 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + local.set $2 + i32.const 0 + local.set $7 + br $break|1 + end + i32.const 0 + local.set $2 + end local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#__get - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#__get - i32.ne + local.get $6 + i32.or if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $6 + i32.const 1 + i32.shl + i32.add + 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 $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 $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 4316 - 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 4304 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $4 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 + i32.sub + local.set $4 + local.get $8 + 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 - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 4112 + 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 + br $while-continue|0 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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - i32.load - local.tee $4 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - local.set $2 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s + local.get $10 + i64.extend_i32_s + local.set $13 + loop $while-continue|4 (result i32) + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $8 + i64.const 10 + i64.mul + local.tee $3 + local.get $13 + i64.shr_u + local.tee $1 + local.get $6 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne if - local.get $2 - local.get $0 - i32.const 4304 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 + local.get $6 i32.const 1 + i32.shl i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - i32.load - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 - 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 16 - i32.sub - i32.load offset=12 - local.tee $1 - local.set $6 - i32.const 0 - local.get $1 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - 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 $6 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get local.get $1 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + local.get $6 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $6 end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - i32.load - 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 $1 - local.get $0 - i32.const 4304 - 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 - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - 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 + i32.const 1 + i32.sub + local.set $4 local.get $3 + local.get $12 + i64.and + local.tee $8 + local.get $5 + i64.ge_u + br_if $while-continue|4 local.get $4 - i32.lt_s - if + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $8 + local.set $1 + local.get $9 + i32.const 0 + local.get $4 + i32.sub + i32.const 2 + i32.shl + i32.const 4112 + 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 - call $~lib/typedarray/Int16Array#__get - local.get $2 + i64.sub + i64.gt_u + local.get $1 + local.get $11 + i64.add local.get $3 - call $~lib/typedarray/Int16Array#__get - i32.ne + 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 - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 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 $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/number/prettify (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 4316 - i32.load - local.tee $4 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 + local.get $2 + i32.eqz + if local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4304 - 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 + 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 - 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 $2 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 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - 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 - local.set $2 - loop $for-loop|1 + local.tee $3 + i32.le_s + if (result i32) local.get $3 - local.get $4 - i32.lt_s - if + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 local.get $1 local.get $3 - call $~lib/typedarray/Uint16Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint16Array#__get - i32.ne + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 - 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/Int32Array,i32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - 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 $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 - i32.const 4304 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $0 + i32.const 2 + i32.add local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + 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 $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 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 3 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - 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 + else local.get $3 - call $~lib/typedarray/Int32Array#__get - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - 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 4304 - 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 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 3 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - 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 - 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 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + 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 + local.tee $1 + i32.const 4 + i32.add + 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 offset=4 + 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 + local.tee $2 + i32.const 4 + i32.add + 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 offset=4 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end 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/Int64Array,i64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) (local $4 i32) - (local $5 i32) + (local $5 i64) (local $6 i32) - i32.const 4316 - i32.load - local.tee $4 - call $~lib/typedarray/Int64Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 + (local $7 i64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + local.get $1 + f64.const 0 + f64.lt + local.tee $8 + if (result f64) local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 4304 - 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 + i32.const 45 + i32.store16 + local.get $1 + f64.neg + else + local.get $1 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 + i64.reinterpret_f64 + local.tee $3 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.tee $6 i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc + i32.ne + i64.extend_i32_u + i64.const 52 + i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and + i64.add local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $3 + local.get $3 + i64.clz + i32.wrap_i64 + local.tee $4 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $6 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $6 + i32.const 1 + i32.sub + local.get $4 + i32.sub + local.set $4 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/Int64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int64Array#__get - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $9 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub 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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - i32.load + local.get $9 + i32.sub + local.get $4 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $4 + 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 $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 4304 - 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 $4 + f64.convert_i32_s local.get $1 - i32.load offset=8 + f64.ne i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + i32.const 3 + i32.shr_s i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 + i32.add + local.tee $4 + i32.const 3 + i32.shl + local.tee $9 i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 + global.set $~lib/util/number/_K + local.get $9 + i32.const 3200 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + local.get $4 + i32.const 1 + i32.shl + i32.const 3920 + 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 $5 local.get $0 - call $~lib/rt/pure/__retain - i32.store + 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 $0 + i64.extend_i32_s + i64.shl + local.tee $2 + i64.const 32 + i64.shr_u + local.tee $7 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $10 + i64.mul local.get $5 - i32.store offset=8 + local.get $7 + i64.mul local.get $2 - local.get $0 - i32.store offset=4 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $5 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 32 + i64.shr_u + i64.add 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 1312 - i32.const 684 - i32.const 5 - 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 $10 + i64.mul + local.get $5 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 4316 - 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 4304 - 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.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.const -64 i32.sub - i32.load offset=12 + global.get $~lib/util/number/_frc_plus + local.tee $2 + i64.const 32 + i64.shr_u local.tee $5 - i32.gt_u - if - i32.const 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end + local.get $3 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - i32.const 3 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc + i64.mul + local.get $2 + i64.const 4294967295 + i64.and local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store + local.get $10 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $5 + i64.const 32 + i64.shr_u + i64.add local.get $2 + local.get $7 + i64.mul local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.sub + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub 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/Float32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float32Array#__get - f32.ne + global.get $~lib/util/number/_frc_minus + local.tee $2 + i64.const 32 + i64.shr_u + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + local.get $5 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $3 + i64.mul + i64.const 32 + i64.shr_u + i64.add + local.tee $3 + i64.const 32 + i64.shr_u + i64.add + local.get $2 + local.get $7 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + i64.add + i64.const 1 + i64.add + i64.sub + local.get $8 + call $~lib/util/number/genDigits + local.get $8 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $8 + i32.add + ) + (func $~lib/util/number/dtoa (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + f64.const 0 + f64.eq + if + i32.const 3056 + 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 3088 + return + end + i32.const 3120 + i32.const 3168 + 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 (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 - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 end - local.get $3 - i32.const 1 + 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 - local.set $3 - br $for-loop|1 + return end + unreachable 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 + call $~lib/util/number/dtoa_core ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinFloatArray (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 4316 - i32.load + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 2928 + 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 2976 + call $~lib/string/String#get:length local.tee $4 - call $~lib/typedarray/Float64Array#constructor + 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 $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $1 + local.get $2 local.get $0 - i32.const 4304 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 + local.get $5 + i32.const 2 + i32.shl 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 1376 - i32.const 1440 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 1040 - i32.const 1440 - i32.const 1746 - i32.const 9 - 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 + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream local.get $2 - local.get $3 - call $~lib/typedarray/Float64Array#__get - f64.ne + i32.add + local.set $2 + local.get $4 if - i32.const 0 - i32.const 1312 - i32.const 684 - i32.const 5 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $2 end - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $5 + br $for-loop|0 end end local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4380 - i32.load local.get $0 - i32.load offset=8 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.tee $0 i32.gt_s if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable + 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/Float32Array#join (param $0 i32) (result i32) local.get $0 i32.load offset=4 - local.set $0 - i32.const 4372 - i32.load - local.set $2 - i32.const 4380 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.add - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (param $0 i32) (param $1 i32) + (func $~lib/util/string/joinFloatArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 + (local $6 i32) local.get $1 - i32.load offset=12 - i32.ne + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2928 + 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 2976 + 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 $1 loop $for-loop|0 - local.get $2 + local.get $5 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 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.set $2 + local.get $4 if - i32.const 4640 - i32.const 3 + local.get $1 local.get $2 - f64.convert_i32_s + i32.const 1 + i32.shl + i32.add + i32.const 2976 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 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $2 end - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 + local.set $5 br $for-loop|0 end end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + local.get $6 local.get $1 - i32.load offset=8 + local.get $2 + local.get $0 + local.get $3 i32.const 3 - i32.shr_u - i32.const 6 + i32.shl i32.add - local.get $0 - i32.load offset=8 + f64.load + call $~lib/util/number/dtoa_stream + local.get $2 + i32.add + local.tee $0 i32.gt_s if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.get $1 + call $~lib/rt/pure/__release + return end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $0 local.get $1 + ) + (func $~lib/typedarray/Float64Array#join (param $0 i32) (result i32) + local.get $0 i32.load offset=4 - local.set $3 - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end + call $~lib/util/string/joinFloatArray ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 + (func $~lib/arraybuffer/ArrayBuffer#constructor (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.load offset=8 - i32.gt_s + i32.const 1073741808 + i32.gt_u if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1040 + i32.const 1088 + i32.const 54 + i32.const 43 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 + 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.load offset=8 - call $~lib/memory/memory.copy + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (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 $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 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $3 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1741 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $0 - 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 - loop $for-loop|0 + 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 1040 + i32.const 1440 + i32.const 1750 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.set $2 + else local.get $1 - i32.lt_s + local.get $2 + i32.add + local.get $3 + i32.gt_s if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 1040 + i32.const 1440 + i32.const 1755 + i32.const 7 + call $~lib/builtins/abort + unreachable end end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - i32.const 4588 - i32.load - i32.const 7 - i32.add + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $3 local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $2 + i32.store offset=8 + local.get $3 local.get $0 - i32.load offset=4 - i32.const 7 + local.get $1 i32.add - i32.const 4580 - i32.load - i32.const 4584 - i32.load - call $~lib/memory/memory.copy + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (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 $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.set $3 + local.get $1 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/Int8Array#constructor - local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 4608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - block $folding-inner0 - i32.const 4444 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner0 + i32.lt_s + if (result i32) local.get $1 - i32.load offset=4 - i32.const 3 + local.get $3 i32.add - local.set $5 - i32.const 4436 - i32.load - local.set $6 - i32.const 4444 - 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 $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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 + local.tee $1 i32.const 0 - i32.const 14 - i32.const 4688 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 4720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> i32.const 0 - local.set $0 - i32.const 4524 - i32.load - i32.const 2 - i32.add - local.get $1 - i32.load offset=8 i32.gt_s - br_if $folding-inner0 + select + else local.get $1 - i32.load offset=4 - i32.const 2 - i32.add - local.set $7 - i32.const 4516 - i32.load - local.set $11 - i32.const 4524 - i32.load - local.set $12 - 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 $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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end + local.get $3 local.get $1 - i32.const 10 + 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 - i32.const 14 - i32.const 4752 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $1 local.get $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 4784 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/rt/pure/__release + i32.gt_s + select + else + local.get $2 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 $1 - 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 + local.get $3 + i32.lt_s + select end - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/array/Array#__unchecked_get (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> (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.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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4316 + 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 + local.get $1 + local.get $0 + i32.const 4304 + 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 $2 + i32.const 1 + global.set $~argumentsLength + i32.const 0 + local.get $2 + i32.const 16 + i32.sub i32.load offset=12 - i32.ne + local.tee $0 + i32.gt_u if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $2 + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.store offset=8 + local.get $4 + local.get $2 + i32.store offset=4 + local.get $4 + call $~lib/rt/pure/__retain + local.set $0 + loop $for-loop|1 + local.get $3 + local.get $5 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Int8Array#__get + local.get $0 + local.get $3 + call $~lib/typedarray/Int8Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + 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 $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 4316 + i32.load + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + local.set $1 loop $for-loop|0 - local.get $2 + local.get $0 local.get $3 i32.lt_s if + local.get $1 + local.get $0 + i32.const 4304 + 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.tee $4 - local.get $1 + local.get $4 local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 + call $~lib/typedarray/Uint8Array#__get i32.ne if - i32.const 4848 - 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 1312 - i32.const 718 - i32.const 7 + i32.const 684 + i32.const 5 call $~lib/builtins/abort unreachable end @@ -21345,11 +21084,17 @@ i32.const 1 i32.add local.set $2 - br $for-loop|0 + 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/testTypedArraySet<~lib/typedarray/Uint8Array> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -21357,477 +21102,480 @@ (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) - i32.const 3 - 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/Uint8Array#constructor - local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + i32.const 4316 + 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 $5 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 4304 + 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.const 10 + 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 $2 + i32.const 1 + global.set $~argumentsLength i32.const 0 - i32.const 21 - i32.const 4816 - call $~lib/rt/__allocArray + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $0 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $2 call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - block $folding-inner0 - i32.const 4444 - 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 4436 - i32.load - local.set $6 - i32.const 4444 - 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 $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 $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 4896 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 + i32.store + local.get $4 + local.get $0 + i32.store offset=8 + local.get $4 + local.get $2 + i32.store offset=4 + local.get $4 + call $~lib/rt/pure/__retain + local.set $0 + loop $for-loop|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 4928 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - i32.const 0 - local.set $0 - i32.const 4524 - 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 4516 - i32.load - local.set $11 - i32.const 4524 - i32.load - local.set $12 - loop $for-loop|00 + local.get $5 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.get $12 - i32.lt_s + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.ne 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 $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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4960 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.get $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 4992 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - 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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> + (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 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + (local $6 i32) + i32.const 4316 + i32.load + local.tee $4 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $0 + 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 $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 5056 - 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 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.get $2 + local.get $0 + i32.const 4304 + 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 $2 + local.set $0 br $for-loop|0 end end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) - local.get $2 + 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 - i32.lt_s + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1774 - i32.const 19 + i32.const 1741 + i32.const 5 call $~lib/builtins/abort unreachable end - 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 - i32.gt_s + local.get $5 + i32.const 1 + i32.and if - i32.const 1376 + i32.const 1040 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1746 + i32.const 9 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.load offset=4 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - loop $for-loop|0 + loop $for-loop|1 local.get $3 - local.get $1 + local.get $4 i32.lt_s if - local.get $0 + local.get $1 local.get $3 - i32.add + call $~lib/typedarray/Int16Array#__get local.get $2 local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - local.tee $4 - i32.wrap_i64 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i64.extend_i32_s - local.get $4 - i32.const 255 - local.get $4 - i32.wrap_i64 - i32.sub - i32.const 31 - i32.shr_s - i64.extend_i32_s - i64.or - i64.and - i64.store8 + call $~lib/typedarray/Int16Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $3 i32.const 1 i32.add local.set $3 - br $for-loop|0 + 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/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1774 - i32.const 19 - call $~lib/builtins/abort - unreachable - end - 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 - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $0 - i32.load offset=4 - i32.add - local.set $2 + (local $5 i32) + (local $6 i32) + i32.const 4316 + 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 4304 + 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 offset=4 - local.set $4 + 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.shr_u - local.set $1 - loop $for-loop|0 + 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 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 + 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 + local.set $2 + loop $for-loop|1 local.get $3 - local.get $1 + local.get $4 i32.lt_s if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint16Array#__get local.get $2 local.get $3 - i32.add - local.get $4 + call $~lib/typedarray/Uint16Array#__get + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $3 i32.const 1 - i32.shl i32.add - i32.load16_s - local.tee $0 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor + 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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4316 + 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 255 + i32.const 4304 local.get $0 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 + 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 + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 + 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 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end local.get $3 i32.const 1 i32.add local.set $3 - br $for-loop|0 + 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/Uint8ClampedArray> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -21835,682 +21583,486 @@ (local $4 i32) (local $5 i32) (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 - call $~lib/typedarray/Int64Array#constructor - local.tee $7 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $7 + i32.const 4316 + 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 4304 + 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 - 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 + global.set $~argumentsLength 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 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 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 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 + 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 + 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 - block $folding-inner0 - i32.const 4380 - i32.load - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner0 - local.get $2 - i32.load offset=4 - local.set $9 - i32.const 4372 - i32.load - local.set $4 - i32.const 4380 - i32.load - local.set $5 - loop $for-loop|0 - local.get $0 - local.get $5 - i32.lt_s + 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 - local.get $0 - local.get $9 - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $2 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $2 - i32.const 255 - local.get $2 - 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 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 5024 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 0 - local.set $0 - i32.const 4444 - 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 $4 - i32.const 4436 - i32.load - local.set $5 - i32.const 4444 - i32.load - local.set $6 - loop $for-loop|00 + 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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4316 + 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 - local.get $6 - i32.lt_s - if - local.get $0 - local.get $4 - i32.add - local.get $5 - 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 5120 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - 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 5152 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 0 - local.set $0 - i32.const 4524 - 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 4516 - i32.load - local.set $10 - i32.const 4524 - i32.load - local.set $11 - loop $for-loop|01 + i32.const 4304 local.get $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 5184 - 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 $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 4588 - 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 4580 - i32.load - local.set $10 - i32.const 4588 - i32.load - local.set $11 - loop $for-loop|02 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set 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 $2 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $2 - i32.const 255 - local.get $2 - 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 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 5216 - 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 $3 - 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 $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - return end - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4380 + local.get $1 i32.load - 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 1376 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1741 + i32.const 5 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.set $0 - i32.const 4372 - i32.load - local.set $2 - i32.const 4380 - i32.load - local.set $3 - 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 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (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 1 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne + local.get $5 + i32.const 7 + i32.and if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + 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 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#__get - local.tee $4 local.get $1 - i32.load offset=4 + local.get $3 + call $~lib/typedarray/Int64Array#__get local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.tee $5 - i32.ne + local.get $3 + call $~lib/typedarray/Int64Array#__get + i64.ne if - i32.const 5296 - 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 1312 - i32.const 718 - i32.const 7 + i32.const 684 + i32.const 5 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/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $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 1 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4316 + i32.load + local.tee $4 + call $~lib/typedarray/Uint64Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 - local.get $2 - local.get $1 + local.get $0 + local.get $4 i32.lt_s if + local.get $1 + local.get $0 + i32.const 4304 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store16 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (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 $5 + i32.gt_u if i32.const 1376 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 7 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 + 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 - i32.const 1 - i32.shl - i32.add - local.get $2 + local.get $1 local.get $3 - i32.add - i32.load8_u - i32.store16 + call $~lib/typedarray/Uint64Array#__get local.get $2 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + 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/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 4316 + 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 4304 + 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.const 1 - i32.shr_u - i32.const 4 i32.add - local.get $0 - i32.load offset=8 + 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 1376 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1741 + i32.const 5 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> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4588 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s + local.get $5 + i32.const 3 + i32.and if - i32.const 1376 + i32.const 1040 i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 1746 + i32.const 9 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 14 - i32.add - local.set $0 - i32.const 4580 - i32.load + 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 4588 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add local.get $1 + local.get $3 + call $~lib/typedarray/Float32Array#__get local.get $2 - i32.add - i32.load8_s - i32.store16 - local.get $1 + local.get $3 + call $~lib/typedarray/Float32Array#__get + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $1 - 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/Int16Array> + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -22518,308 +22070,211 @@ (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) - i32.const 3 - 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 + i32.const 4316 + i32.load 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/Int16Array#constructor - local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + 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 4304 + 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 10 + 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.const 22 - i32.const 5248 - call $~lib/rt/__allocArray + 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 1376 + i32.const 1440 + i32.const 1741 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 7 + i32.and + if + i32.const 1040 + i32.const 1440 + i32.const 1746 + i32.const 9 + 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 - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - block $folding-inner0 - i32.const 4444 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 6 - i32.add - local.set $5 - i32.const 4436 - i32.load - local.set $6 - i32.const 4444 - i32.load - local.set $7 - loop $for-loop|0 - local.get $0 - local.get $7 - i32.lt_s + 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 - local.get $5 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $6 - local.get $0 - 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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + i32.const 0 + i32.const 1312 + i32.const 684 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 end - local.get $1 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 5344 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + 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> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4380 + i32.load + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + i32.const 4372 + i32.load + local.set $2 + i32.const 4380 + i32.load + local.set $3 + loop $for-loop|0 local.get $1 local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 5392 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.lt_s + if + local.get $0 + local.get $1 + i32.add + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (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 - local.set $0 - i32.const 4524 - i32.load - i32.const 2 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $1 - i32.load offset=4 - i32.const 4 - i32.add - local.set $7 - i32.const 4516 - i32.load - local.set $11 - i32.const 4524 - i32.load - local.set $12 - loop $for-loop|00 - local.get $0 - local.get $12 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $11 - local.get $0 - 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 $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 5440 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $1 - local.get $4 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $1 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 5488 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - 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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (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 1 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if + i32.const 1312 + i32.const 712 + i32.const 3 + 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/Uint16Array#__get + call $~lib/typedarray/Int8Array#__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 i32.ne if - i32.const 5584 + i32.const 4640 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 @@ -22838,110 +22293,266 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - i32.const 3 - 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 + local.get $1 + i32.load offset=8 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/Uint16Array#constructor - local.tee $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 6 + i32.add + local.set $0 local.get $1 - i32.const 10 - i32.const 1 - i32.const 23 - i32.const 5536 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - block $folding-inner0 - i32.const 4444 - i32.load - i32.const 3 - i32.add - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - br_if $folding-inner0 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 local.get $1 - i32.load offset=4 - i32.const 6 - i32.add - local.set $5 - i32.const 4436 - i32.load - local.set $6 - i32.const 4444 - i32.load - local.set $7 - loop $for-loop|0 + i32.lt_s + if local.get $0 - local.get $7 - i32.lt_s - if - local.get $5 - local.get $0 - i32.const 1 - i32.shl + local.get $2 + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + 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> (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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $0 + 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 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.store8 + 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> (param $0 i32) + i32.const 4588 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 7 + i32.add + i32.const 4580 + i32.load + i32.const 4584 + i32.load + call $~lib/memory/memory.copy + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> + (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 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + i32.const 3 + 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/Int8Array#constructor + local.tee $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 4608 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + block $folding-inner0 + i32.const 4444 + 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 4436 + i32.load + local.set $6 + i32.const 4444 + 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 @@ -22956,11 +22567,11 @@ f32.eq if (result i32) local.get $8 - i32.trunc_f32_u + i32.trunc_f32_s else i32.const 0 end - i32.store16 + i32.store8 local.get $0 i32.const 1 i32.add @@ -22970,25 +22581,25 @@ end local.get $1 i32.const 10 - i32.const 1 - i32.const 23 - i32.const 5632 + i32.const 0 + i32.const 14 + i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $1 local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> local.get $1 i32.const 10 - i32.const 1 - i32.const 23 - i32.const 5680 + i32.const 0 + i32.const 14 + i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> i32.const 0 local.set $0 i32.const 4524 @@ -22997,13 +22608,11 @@ i32.add local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u i32.gt_s br_if $folding-inner0 local.get $1 i32.load offset=4 - i32.const 4 + i32.const 2 i32.add local.set $7 i32.const 4516 @@ -23017,10 +22626,8 @@ local.get $12 i32.lt_s if - local.get $7 local.get $0 - i32.const 1 - i32.shl + local.get $7 i32.add local.get $11 local.get $0 @@ -23035,11 +22642,11 @@ f64.eq if (result i32) local.get $9 - i32.trunc_f64_u + i32.trunc_f64_s else i32.const 0 end - i32.store16 + i32.store8 local.get $0 i32.const 1 i32.add @@ -23049,32 +22656,32 @@ end local.get $1 i32.const 10 - i32.const 1 - i32.const 23 - i32.const 5728 + i32.const 0 + i32.const 14 + i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 call $~lib/rt/pure/__release local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $1 local.get $4 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $1 i32.const 10 - i32.const 1 - i32.const 23 - i32.const 5776 + i32.const 0 + i32.const 14 + i32.const 4784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 call $~lib/rt/pure/__release local.get $3 @@ -23100,56 +22707,20 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1774 - i32.const 19 - 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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end + (func $~lib/array/Array#__unchecked_get (param $0 i32) (param $1 i32) (result i32) 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 + i32.add + i32.load8_u ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (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 @@ -23169,22 +22740,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Int32Array#__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 i32.ne if - i32.const 5888 + i32.const 4848 i32.const 3 local.get $2 f64.convert_i32_s local.get $4 - f64.convert_i32_s + f64.convert_i32_u local.get $5 - f64.convert_i32_s + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -23203,109 +22774,313 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 + (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) i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 + 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 - i32.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 + 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.shr_u - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store32 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (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 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.shr_u - i32.gt_s - if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 - local.get $2 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4816 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + block $folding-inner0 + i32.const 4444 + i32.load + i32.const 3 + i32.add local.get $1 - i32.lt_s - if + 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 4436 + i32.load + local.set $6 + i32.const 4444 + i32.load + local.set $7 + loop $for-loop|0 local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $2 - local.get $3 - i32.add - i32.load8_u - i32.store - local.get $2 + 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 $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 $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 4896 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + 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 4928 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 0 + local.set $0 + i32.const 4524 + 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 4516 + i32.load + local.set $11 + i32.const 4524 + i32.load + local.set $12 + 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 $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 $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 4960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $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 4992 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + 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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) + (local $2 i32) + (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 1312 + i32.const 712 + i32.const 3 + 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 5056 + 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 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 i32.const 1 i32.add local.set $2 @@ -23313,19 +23088,28 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i64) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1774 + i32.const 19 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - i32.const 4 + local.get $2 i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 1376 @@ -23337,54 +23121,79 @@ end local.get $0 i32.load offset=4 - i32.const 16 + local.get $2 i32.add local.set $0 local.get $1 i32.load offset=4 - local.set $3 + local.set $2 local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $1 loop $for-loop|0 - local.get $2 + local.get $3 local.get $1 i32.lt_s if local.get $0 - local.get $2 - i32.const 2 - i32.shl + local.get $3 i32.add local.get $3 - local.get $2 - i32.const 1 + i32.const 3 i32.shl - i32.add - i32.load16_s - i32.store local.get $2 - i32.const 1 i32.add - local.set $2 - br $for-loop|0 - end - end + i64.load + local.tee $4 + i32.wrap_i64 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i64.extend_i32_s + i32.const 255 + local.get $4 + i32.wrap_i64 + i32.sub + i32.const 31 + i32.shr_s + i64.extend_i32_s + local.get $4 + i64.or + i64.and + i64.store8 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - i32.const 4588 - i32.load - i32.const 7 + (local $4 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1774 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.get $2 i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 1376 @@ -23396,39 +23205,54 @@ end local.get $0 i32.load offset=4 - i32.const 28 + local.get $2 i32.add - local.set $0 - i32.const 4580 - i32.load local.set $2 - i32.const 4588 - i32.load - local.set $3 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 loop $for-loop|0 - local.get $1 local.get $3 + local.get $1 i32.lt_s if - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $1 local.get $2 + local.get $3 i32.add - i32.load8_s - i32.store - local.get $1 + local.get $3 i32.const 1 + i32.shl + local.get $4 i32.add - local.set $1 + i32.load16_s + local.tee $0 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i32.const 255 + local.get $0 + i32.sub + i32.const 31 + i32.shr_s + local.get $0 + i32.or + i32.and + i32.store8 + local.get $3 + i32.const 1 + i32.add + local.set $3 br $for-loop|0 end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (local $0 i32) (local $1 i32) (local $2 i32) @@ -23438,250 +23262,356 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) - (local $10 f64) + (local $9 i32) + (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 f32) + (local $13 f64) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $7 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $7 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + 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 + 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 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $8 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $8 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $8 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - i32.const 4368 - 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 5824 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $11 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.set $2 block $folding-inner0 - i32.const 4444 + i32.const 4380 i32.load - i32.const 3 - i32.add - 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 $2 i32.load offset=4 - i32.const 12 - i32.add - local.set $5 - i32.const 4436 + local.set $9 + i32.const 4372 i32.load - local.set $6 - i32.const 4444 + local.set $4 + i32.const 4380 i32.load - local.set $7 + local.set $5 loop $for-loop|0 - local.get $1 - local.get $7 + local.get $0 + local.get $5 i32.lt_s if - local.get $5 - local.get $1 + local.get $0 + local.get $9 + i32.add + local.get $4 + local.get $0 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.load + local.tee $2 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $2 + i32.const 255 + local.get $2 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 5936 - 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 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 i32.const 10 - i32.const 2 - i32.const 15 - i32.const 6000 + i32.const 0 + i32.const 21 + i32.const 5024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> i32.const 0 - local.set $1 - i32.const 4524 + local.set $0 + i32.const 4444 i32.load - i32.const 2 + i32.const 3 i32.add - 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 - i32.const 8 + i32.const 3 i32.add - local.set $7 - i32.const 4516 + local.set $4 + i32.const 4436 i32.load - local.set $8 - i32.const 4524 + local.set $5 + i32.const 4444 i32.load - local.set $12 + local.set $6 loop $for-loop|00 - local.get $1 - local.get $12 + local.get $0 + local.get $6 i32.lt_s if - local.get $7 - local.get $1 + local.get $0 + local.get $4 + i32.add + local.get $5 + local.get $0 i32.const 2 i32.shl i32.add - local.get $8 - local.get $1 + 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 5120 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + 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 5152 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + i32.const 4524 + 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 4516 + i32.load + local.set $10 + i32.const 4524 + i32.load + local.set $11 + loop $for-loop|01 + local.get $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 $10 - local.get $10 + local.tee $13 + local.get $13 f64.sub f64.const 0 f64.eq if (result i32) - local.get $10 - i32.trunc_f64_s + f64.const 0 + f64.const 255 + local.get $13 + f64.min + f64.max + i32.trunc_f64_u else i32.const 0 end - i32.store - local.get $1 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|00 + local.set $0 + br $for-loop|01 end end - local.get $0 + local.get $1 i32.const 10 - i32.const 2 - i32.const 15 - i32.const 6064 + i32.const 0 + i32.const 21 + i32.const 5184 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.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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 4588 + 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 4580 + i32.load + local.set $10 + i32.const 4588 + i32.load + local.set $11 + 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 $2 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $2 + i32.const 255 + local.get $2 + 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 2 - i32.const 15 - i32.const 6128 + i32.const 0 + i32.const 21 + i32.const 5216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $1 + 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 $3 call $~lib/rt/pure/__release - local.get $2 + local.get $8 call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $9 call $~lib/rt/pure/__release - local.get $11 + local.get $4 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 1376 @@ -23691,50 +23621,107 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 4380 + i32.load local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if + local.get $0 + i32.load offset=4 + local.set $0 + i32.const 4372 + i32.load + local.set $2 + i32.const 4380 + i32.load + local.set $3 + 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 local.get $2 - call $~lib/typedarray/Uint32Array#__get + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (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 1 + i32.shr_u + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 712 + i32.const 3 + 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/Int16Array#__get local.tee $4 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_s local.tee $5 i32.ne if - i32.const 6256 + i32.const 5296 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 @@ -23753,278 +23740,157 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) - (local $12 i32) + local.get $1 + i32.load offset=8 i32.const 3 - 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.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 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.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 12 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 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.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (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.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 4368 - i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 10 - i32.const 2 - i32.const 24 - i32.const 6192 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $11 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - block $folding-inner0 - i32.const 4444 - 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 4436 - i32.load - local.set $6 - i32.const 4444 - 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 6304 - 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 6368 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - i32.const 0 - local.set $1 - i32.const 4524 - 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 4516 - i32.load - local.set $8 - i32.const 4524 - i32.load - local.set $12 - 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 6432 - 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 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|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 6496 - 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 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4380 + i32.const 4588 i32.load + i32.const 7 + i32.add local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -24037,11 +23903,13 @@ end local.get $0 i32.load offset=4 + i32.const 14 + i32.add local.set $0 - i32.const 4372 + i32.const 4580 i32.load local.set $2 - i32.const 4380 + i32.const 4588 i32.load local.set $3 loop $for-loop|0 @@ -24051,16 +23919,14 @@ if local.get $0 local.get $1 - i32.const 3 + i32.const 1 i32.shl i32.add - local.get $2 local.get $1 - i32.const 2 - i32.shl + local.get $2 i32.add - i64.load32_s - i64.store + i32.load8_s + i32.store16 local.get $1 i32.const 1 i32.add @@ -24069,209 +23935,326 @@ end end ) - (func $~lib/array/Array#__unchecked_get (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> (param $0 i32) (param $1 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 i64) - local.get $0 - i32.load offset=8 + (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) i32.const 3 - i32.shr_u + call $~lib/typedarray/Int64Array#constructor local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 712 + 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/Int16Array#constructor + local.tee $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 5248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + block $folding-inner0 + i32.const 4444 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if + i32.add + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 6 + i32.add + local.set $5 + i32.const 4436 + i32.load + local.set $6 + i32.const 4444 + i32.load + local.set $7 + loop $for-loop|0 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 + local.get $7 + i32.lt_s if - i32.const 6656 - 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 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $0 + 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 $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - loop $for-loop|0 - local.get $2 local.get $1 - i32.lt_s - if + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 5344 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $1 + local.get $3 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 5392 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 + i32.const 4524 + i32.load + i32.const 2 + i32.add + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 4 + i32.add + local.set $7 + i32.const 4516 + i32.load + local.set $11 + i32.const 4524 + i32.load + local.set $12 + loop $for-loop|00 local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $3 - i32.add - i64.load8_u - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $11 + local.get $0 + 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 $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end + local.get $1 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 5440 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $4 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 5488 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $1 + 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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (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 $4 i32) + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - i32.gt_s + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 + i32.const 0 + i32.const 1312 + i32.const 712 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $0 - 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 loop $for-loop|0 local.get $2 - local.get $1 + local.get $3 i32.lt_s if local.get $0 local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $3 + call $~lib/typedarray/Uint16Array#__get + local.tee $4 + local.get $1 + i32.load offset=4 local.get $2 i32.const 1 i32.shl i32.add - i64.load16_s - i64.store + i32.load16_u + local.tee $5 + i32.ne + if + i32.const 5584 + 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 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end local.get $2 i32.const 1 i32.add @@ -24280,62 +24263,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 4588 - 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 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 56 - i32.add - local.set $0 - i32.const 4580 - i32.load - local.set $2 - i32.const 4588 - i32.load - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $1 - local.get $2 - i32.add - i64.load8_s - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (local $0 i32) (local $1 i32) (local $2 i32) @@ -24349,7 +24277,6 @@ (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $3 @@ -24397,32 +24324,32 @@ 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 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 6560 + i32.const 1 + i32.const 23 + i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> block $folding-inner0 i32.const 4444 i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 + 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 24 + i32.const 6 i32.add local.set $5 i32.const 4436 @@ -24432,17 +24359,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 - i32.const 3 + 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 @@ -24452,56 +24379,56 @@ f32.sub f32.const 0 f32.eq - if (result i64) + if (result i32) local.get $8 - i64.trunc_f32_s + i32.trunc_f32_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store16 + 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 3 - i32.const 25 - i32.const 6704 + i32.const 1 + i32.const 23 + i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $1 local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> - local.get $0 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 6800 + i32.const 1 + i32.const 23 + i32.const 5680 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/Uint16Array> i32.const 0 - local.set $1 + local.set $0 i32.const 4524 i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 - i32.const 3 + 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 16 + i32.const 4 i32.add local.set $7 i32.const 4516 @@ -24511,18 +24438,19 @@ i32.load local.set $12 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if local.get $7 - local.get $1 - i32.const 3 + local.get $0 + i32.const 1 i32.shl - local.tee $13 i32.add local.get $11 - local.get $13 + local.get $0 + i32.const 3 + i32.shl i32.add f64.load local.tee $9 @@ -24530,49 +24458,49 @@ f64.sub f64.const 0 f64.eq - if (result i64) + if (result i32) local.get $9 - i64.trunc_f64_s + i32.trunc_f64_u else - i64.const 0 + i32.const 0 end - i64.store - local.get $1 + i32.store16 + 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 3 - i32.const 25 - i32.const 6896 + i32.const 1 + i32.const 23 + i32.const 5728 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.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 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 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 6992 + i32.const 1 + i32.const 23 + i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $1 + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -24580,7 +24508,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 @@ -24597,14 +24525,55 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1774 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=12 + local.get $2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + 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/Int32Array> (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.const 2 i32.shr_u local.tee $3 local.get $1 @@ -24625,22 +24594,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Uint64Array#__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 - i64.ne + i32.ne if - i32.const 7184 + i32.const 5888 i32.const 3 local.get $2 f64.convert_i32_s local.get $4 - f64.convert_i64_u + f64.convert_i32_s local.get $5 - f64.convert_i64_u + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -24659,326 +24628,108 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $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 $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 + local.get $1 + i32.load offset=8 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.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 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.shr_u + i32.gt_s + if + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 10 - i32.const 3 - i32.const 26 - i32.const 7088 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - block $folding-inner0 - i32.const 4444 - 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 4436 - i32.load - local.set $6 - i32.const 4444 - 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 7232 - 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 7328 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - i32.const 0 - local.set $1 - i32.const 4524 - 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 4516 - i32.load - local.set $11 - i32.const 4524 - i32.load - local.set $12 - 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 7424 - 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 + i32.load offset=4 + i32.const 24 + i32.add + local.set $0 + 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 + loop $for-loop|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 7520 - 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 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store32 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 f32) - (local $5 f32) + local.get $1 + i32.load offset=8 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.gt_s if - i32.const 0 - i32.const 1312 - i32.const 712 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 loop $for-loop|0 local.get $2 - local.get $3 + local.get $1 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Float32Array#__get - local.tee $4 - local.get $1 - i32.load offset=4 - local.get $2 i32.const 2 i32.shl i32.add - f32.load - local.tee $5 - f32.ne - if - i32.const 7680 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.promote_f32 - local.get $5 - f64.promote_f32 - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1312 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end + local.get $2 + local.get $3 + i32.add + i32.load8_u + i32.store local.get $2 i32.const 1 i32.add @@ -24987,7 +24738,122 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $0 + 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 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.store + 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> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4588 + 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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $0 + i32.const 4580 + i32.load + local.set $2 + i32.const 4588 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_s + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (local $0 i32) (local $1 i32) (local $2 i32) @@ -24997,347 +24863,249 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $6 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - local.set $7 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + i32.const 4368 + 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 5824 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> block $folding-inner0 - i32.const 4380 + i32.const 4444 i32.load - local.get $1 + 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 $7 + local.get $0 i32.load offset=4 - local.set $7 - i32.const 4372 + i32.const 12 + i32.add + local.set $5 + i32.const 4436 i32.load - local.set $10 - i32.const 4380 + local.set $6 + i32.const 4444 i32.load - local.set $8 + local.set $7 loop $for-loop|0 - local.get $0 - local.get $8 + local.get $1 + local.get $7 i32.lt_s if - local.get $7 - local.get $0 + local.get $5 + local.get $1 i32.const 2 i32.shl - local.tee $2 + local.tee $8 i32.add - local.get $2 - local.get $10 + local.get $6 + local.get $8 i32.add - i32.load - f32.convert_i32_s - f32.store - local.get $0 + 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 $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 i32.const 2 - i32.const 19 - i32.const 7616 + i32.const 15 + i32.const 5936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $1 - i32.const 4432 - 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 7728 + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + 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 15 + i32.const 6000 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> i32.const 0 - local.set $0 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 + local.set $1 + i32.const 4524 + i32.load + i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 - i32.const 24 + i32.const 8 i32.add + local.set $7 + i32.const 4516 + i32.load local.set $8 - 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 4524 + i32.load + local.set $12 loop $for-loop|00 - local.get $0 - local.get $4 + local.get $1 + local.get $12 i32.lt_s if - local.get $8 - local.get $0 + local.get $7 + local.get $1 i32.const 2 i32.shl i32.add - local.get $2 - local.get $0 + local.get $8 + local.get $1 i32.const 3 i32.shl i32.add - i64.load - f32.convert_i64_s - f32.store - local.get $0 + 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 $0 + local.set $1 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 i32.const 2 - i32.const 19 - i32.const 7792 + i32.const 15 + i32.const 6064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - 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 - 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 $9 - loop $for-loop|01 - local.get $0 - local.get $9 - 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 - i32.const 0 - local.set $0 - 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 $9 - loop $for-loop|02 - local.get $0 - local.get $9 - 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 0 - local.set $0 - i32.const 4588 - 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 4580 - i32.load - local.set $4 - i32.const 4588 - i32.load - local.set $9 - loop $for-loop|03 - local.get $0 - local.get $9 - 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.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 19 - i32.const 7856 + i32.const 15 + i32.const 6128 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 + 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 $6 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $11 call $~lib/rt/pure/__release - local.get $8 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release return end @@ -25348,14 +25116,14 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 f64) - (local $5 f64) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.tee $3 local.get $1 @@ -25376,24 +25144,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Uint32Array#__get local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load + call $~lib/array/Array#__unchecked_get local.tee $5 - f64.ne + i32.ne if - i32.const 8016 + i32.const 6256 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 @@ -25412,7 +25178,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (local $0 i32) (local $1 i32) (local $2 i32) @@ -25422,391 +25188,249 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $8 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.set $9 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + i32.const 4368 + 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 6192 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> block $folding-inner0 - i32.const 4380 + i32.const 4444 i32.load - local.get $1 - i32.load offset=8 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 $9 + local.get $0 i32.load offset=4 - local.set $9 - i32.const 4372 + i32.const 12 + i32.add + local.set $5 + i32.const 4436 i32.load - local.set $10 - i32.const 4380 + local.set $6 + i32.const 4444 i32.load - local.set $4 + local.set $7 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $7 i32.lt_s if - local.get $9 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $10 - local.get $0 + local.get $5 + local.get $1 i32.const 2 i32.shl + local.tee $8 i32.add - i32.load - f64.convert_i32_s - f64.store - local.get $0 + 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 $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7920 + i32.const 2 + i32.const 24 + i32.const 6304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + 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 6368 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> i32.const 0 - local.set $0 - i32.const 4444 + local.set $1 + i32.const 4524 i32.load - i32.const 3 + i32.const 2 i32.add - local.get $1 + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 - i32.const 24 + i32.const 8 i32.add - local.set $10 - i32.const 4436 + local.set $7 + i32.const 4516 i32.load - local.set $4 - i32.const 4444 + local.set $8 + i32.const 4524 i32.load - local.set $2 + local.set $12 loop $for-loop|00 - local.get $0 - local.get $2 + local.get $1 + local.get $12 i32.lt_s if - local.get $10 - local.get $0 - i32.const 3 + local.get $7 + local.get $1 + i32.const 2 i32.shl i32.add - local.get $4 - local.get $0 - i32.const 2 + local.get $8 + local.get $1 + i32.const 3 i32.shl i32.add - f32.load - f64.promote_f32 - f64.store - local.get $0 + 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 $0 + local.set $1 br $for-loop|00 end end - local.get $1 + local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 8064 + i32.const 2 + i32.const 24 + i32.const 6432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - 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 - i32.shr_u - i32.const 6 - i32.add + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner0 + 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 6496 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> 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 - loop $for-loop|01 - local.get $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 - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 8160 - call $~lib/rt/__allocArray - 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 - 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 - loop $for-loop|02 - 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_u - f64.convert_i32_u - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - i32.const 0 - local.set $0 - 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 - 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 0 - local.set $0 - i32.const 4588 - 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 4580 - i32.load - local.set $5 - i32.const 4588 - i32.load - local.set $6 - 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 8256 - 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 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $0 call $~lib/rt/pure/__release - local.get $10 + local.get $11 call $~lib/rt/pure/__release - local.get $4 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release return end @@ -25817,1103 +25441,1841 @@ call $~lib/builtins/abort unreachable ) - (func $start:std/typedarray - (local $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i64) - (local $21 f32) - (local $22 f64) - (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 $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 4380 + i32.load + local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 - i32.ne + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 95 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 96 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load offset=4 + local.set $0 + i32.const 4372 + i32.load + local.set $2 + i32.const 4380 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end end + ) + (func $~lib/array/Array#__unchecked_get (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> (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 12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 97 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 3 + i32.shr_u + local.tee $3 local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 + i32.load offset=12 i32.ne if i32.const 0 i32.const 1312 - i32.const 98 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 99 - i32.const 3 - 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/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 6656 + 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 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get + i32.load offset=8 i32.const 3 - i32.ne + 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 1312 - i32.const 100 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + i32.const 48 + i32.add local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#subarray - local.set $0 + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.load offset=8 + call $~lib/memory/memory.copy + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (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.const 3 i32.shr_u - i32.const 1 - i32.ne + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 103 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 104 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.load offset=4 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $3 + i32.add + i64.load8_u + i64.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.get $0 + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (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.ne + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 105 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 106 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - i32.const 8 - 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 7 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 3 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 5 - f64.const 4 - call $~lib/typedarray/Float64Array#__set + i32.load offset=4 + i32.const 32 + i32.add + local.set $0 local.get $1 - i32.const 6 - f64.const 3 - call $~lib/typedarray/Float64Array#__set + i32.load offset=4 + local.set $3 local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i64.load16_s + i64.store + 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> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 4588 + i32.load i32.const 7 - f64.const 8 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Float64Array#subarray - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + i32.add local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - i32.const 4 - i32.ne + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 122 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 16 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 123 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.load offset=4 + i32.const 56 + i32.add + local.set $0 + i32.const 4580 + i32.load + local.set $2 + i32.const 4588 + i32.load + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $1 + local.get $2 + i32.add + i64.load8_s + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + (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 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 $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/Int64Array#constructor + local.tee $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 - i32.load offset=8 - i32.const 32 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 124 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 6560 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + block $folding-inner0 + i32.const 4444 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - global.set $~argumentsLength - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + i32.add local.get $0 - call $~lib/rt/pure/__retain - local.tee $28 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $29 - i32.const 1 - i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $28 + i32.gt_s + br_if $folding-inner0 + local.get $0 i32.load offset=4 - local.set $1 - local.get $29 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.set $22 + i32.const 24 + i32.add + local.set $5 + i32.const 4436 + i32.load + local.set $6 + i32.const 4444 + i32.load + local.set $7 + loop $for-loop|0 local.get $1 - f64.load - local.set $16 - i32.const 2 - global.set $~argumentsLength - local.get $22 - local.get $16 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 + local.get $7 i32.lt_s if + local.get $5 local.get $1 - local.get $16 - f64.store offset=8 + i32.const 3 + i32.shl + i32.add + local.get $6 local.get $1 - local.get $22 - f64.store + 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 - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $29 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $29 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $29 - call $~lib/util/sort/weakHeapSort end - end - local.get $28 - call $~lib/rt/pure/__release - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.eq - if (result i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.eq - else - i32.const 0 - end - if (result i32) + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 6704 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.eq - else - i32.const 0 - end - if (result i32) + local.get $3 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> local.get $0 + i32.const 10 i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.eq - else - i32.const 0 - end - i32.eqz - if + i32.const 25 + i32.const 6800 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> i32.const 0 - i32.const 1312 - i32.const 126 + local.set $1 + i32.const 4524 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const -32 - 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 256 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - if - i32.const 0 - i32.const 1312 - i32.const 135 + 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 4516 + i32.load + local.set $11 + i32.const 4524 + i32.load + local.set $12 + 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 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 136 + i32.const 25 + i32.const 6896 + 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 - call $~lib/builtins/abort - unreachable + i32.const 25 + i32.const 6992 + 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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i64) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 255 + i32.load offset=12 i32.ne if i32.const 0 i32.const 1312 - i32.const 137 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + 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 7184 + 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 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + (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 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 $3 i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 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 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 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 + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1504 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $29 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 149 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 i32.const 0 - i32.const 14 - i32.const 1584 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $28 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 152 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1616 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 155 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1648 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 158 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + 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 14 - i32.const 1680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 161 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray + 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/Uint64Array#constructor local.tee $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 - i32.load offset=8 + i32.const 10 i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 165 + i32.const 26 + i32.const 7088 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + block $folding-inner0 + i32.const 4444 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 166 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 167 + 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 4436 + i32.load + local.set $6 + i32.const 4444 + 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 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 0 - i32.const 14 - i32.const 1712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if + i32.const 26 + i32.const 7232 + 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 7328 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> i32.const 0 - i32.const 1312 - i32.const 168 + local.set $1 + i32.const 4524 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable + 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 4516 + i32.load + local.set $11 + i32.const 4524 + i32.load + local.set $12 + 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 7424 + 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 7520 + 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 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 f32) + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 local.get $1 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 1744 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $23 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=12 + i32.ne if i32.const 0 i32.const 1312 - i32.const 169 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - 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 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Float32Array#__get + local.tee $4 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $5 + f32.ne + if + i32.const 7680 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.promote_f32 + local.get $5 + f64.promote_f32 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> + (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 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $7 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 + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $5 i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $5 i32.const 2 - i32.const 15 - i32.const 1776 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $29 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 181 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $5 + 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 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1824 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $28 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 184 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $8 i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $8 i32.const 2 - i32.const 15 - i32.const 1872 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.set $9 + block $folding-inner1 + i32.const 4380 + i32.load + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $9 + i32.load offset=4 + local.set $9 + i32.const 4372 + i32.load + local.set $10 + i32.const 4380 + i32.load + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $9 + local.get $2 + i32.const 2 + i32.shl + local.tee $4 + i32.add + local.get $4 + local.get $10 + i32.add + i32.load + f32.convert_i32_s + f32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 7616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $1 + i32.const 4432 + 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 7728 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 - i32.const 1312 - i32.const 187 + local.set $2 + local.get $7 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + 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-inner1 + local.get $1 + i32.load offset=4 + i32.const 24 + i32.add + local.set $3 + local.get $7 + i32.load offset=4 + local.set $4 + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|00 + local.get $2 + local.get $6 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + f32.convert_i64_s + f32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 7792 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $5 + i32.load offset=8 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $5 + i32.load offset=4 + local.set $4 + local.get $5 + i32.load offset=8 + local.set $6 + loop $for-loop|001 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $3 + 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|001 + end + end + i32.const 0 + local.set $0 + 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 2 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $1 + i32.load offset=4 + i32.const 16 + i32.add + local.set $3 + local.get $8 + i32.load offset=4 + local.set $4 + local.get $8 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|02 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $3 + 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 0 + local.set $0 + i32.const 4588 + 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-inner1 + local.get $1 + i32.load offset=4 + i32.const 28 + i32.add + local.set $3 + i32.const 4580 + i32.load + local.set $4 + i32.const 4588 + i32.load + local.set $6 + loop $for-loop|01 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $3 + 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|01 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 7856 + 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 $7 + call $~lib/rt/pure/__release + local.get $5 + 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 $10 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + 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 1312 - i32.const 190 + i32.const 712 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1968 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 193 - i32.const 3 - 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/Float64Array#__get + local.tee $4 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $5 + f64.ne + if + i32.const 8016 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + local.get $5 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1312 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end end - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $0 - i32.const 0 + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> + (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 $11 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 + 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 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 197 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i64.const 9 + call $~lib/typedarray/Int64Array#__set i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 198 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 199 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 2 - i32.const 15 - i32.const 2016 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 200 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2048 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $23 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 201 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - 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 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $5 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 101 + call $~lib/typedarray/Uint8Array#__set + local.get $5 i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $5 i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $1 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set 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 - i32.const 5 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 6 - call $~lib/typedarray/Int8Array#subarray - local.tee $0 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 i32.const 0 - call $~lib/typedarray/Int8Array#__get + 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.ne - if - i32.const 0 - i32.const 1312 - i32.const 222 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 223 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + local.set $9 + block $folding-inner1 + i32.const 4380 + i32.load + local.get $2 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 224 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 225 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 5 - call $~lib/typedarray/Int8Array#subarray - local.tee $29 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 228 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $9 + i32.load offset=4 + local.set $9 + i32.const 4372 + i32.load + local.set $10 + i32.const 4380 + i32.load + local.set $3 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $10 + 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 $2 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.load offset=8 - i32.const 4 - i32.ne - if + i32.const 20 + i32.const 7920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - i32.const 1312 - i32.const 229 + local.set $0 + i32.const 4444 + i32.load i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 230 + i32.add + local.get $2 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 231 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $2 + i32.load offset=4 + i32.const 24 + i32.add + local.set $10 + i32.const 4436 + i32.load + local.set $3 + i32.const 4444 + i32.load + local.set $4 + loop $for-loop|00 + 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 $3 + 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 $2 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $29 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray - local.tee $28 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if + i32.const 20 + i32.const 8064 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - i32.const 1312 - i32.const 234 + local.set $0 + local.get $7 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 235 + i32.shr_u + i32.const 6 + i32.add + local.get $2 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 236 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $2 + i32.load offset=4 + i32.const 48 + i32.add + local.set $3 + local.get $7 + i32.load offset=4 + local.set $4 + local.get $7 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 237 + i32.shr_u + local.set $6 + loop $for-loop|01 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $3 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + local.get $4 + local.get $11 + i32.add + i64.load + f64.convert_i64_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $2 + i32.const 10 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release + i32.const 20 + i32.const 8160 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + block $folding-inner0 + local.get $5 + i32.load offset=8 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $5 + i32.load offset=4 + local.set $4 + local.get $5 + i32.load offset=8 + local.set $6 + loop $for-loop|02 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|02 + end + end + i32.const 0 + local.set $1 + local.get $8 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner1 + local.get $2 + i32.load offset=4 + i32.const 32 + i32.add + local.set $3 + local.get $8 + i32.load offset=4 + local.set $4 + local.get $8 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|03 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + f64.convert_i32_s + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|03 + end + end + i32.const 0 + local.set $1 + i32.const 4588 + i32.load + i32.const 7 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 56 + i32.add + local.set $3 + i32.const 4580 + i32.load + local.set $4 + i32.const 4588 + i32.load + local.set $6 + loop $for-loop|004 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $1 + local.get $4 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|004 + end + end + local.get $2 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 8256 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + 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 $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + return + end + end + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $start:std/typedarray + (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 $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 f64) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 f32) + (local $23 f64) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 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 $1 i32.const 0 @@ -26928,5059 +27290,5046 @@ 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 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $29 - local.get $1 - i32.const 0 - i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $27 - i32.const 5 + i32.load offset=8 i32.const 2 - i32.const 15 - i32.const 2096 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 248 + i32.const 95 i32.const 3 call $~lib/builtins/abort unreachable end - 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.get $0 - i32.const 1 - i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $26 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2144 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 1312 - i32.const 250 + i32.const 96 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $28 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - i32.const 1 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2192 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $19 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + local.get $1 + i32.load offset=8 + i32.const 12 + i32.ne if i32.const 0 i32.const 1312 - i32.const 252 + i32.const 97 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 + local.get $1 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $28 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 98 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $28 - i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 99 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 2 - i32.const 15 - i32.const 2240 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 254 + i32.const 100 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $0 + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#subarray + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 - i32.const 0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 - i32.const 5 + local.get $0 + i32.load offset=8 i32.const 2 - i32.const 15 - i32.const 2288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $15 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + i32.const 1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 256 + i32.const 103 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 1 - i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $14 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2336 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $13 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.ne if i32.const 0 i32.const 1312 - i32.const 258 + i32.const 104 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 1 - i32.const 2 + i32.load offset=8 i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $12 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $11 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.ne if i32.const 0 i32.const 1312 - i32.const 260 + i32.const 105 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 - call $~lib/rt/pure/__release - local.tee $0 i32.const 0 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $10 - i32.const 5 + call $~lib/typedarray/Int32Array#__get i32.const 2 - i32.const 15 - i32.const 2432 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.ne if i32.const 0 i32.const 1312 - i32.const 262 + i32.const 106 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 call $~lib/rt/pure/__release - local.tee $0 + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 i32.const 0 - i32.const -2 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $8 + 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 7 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 3 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $1 i32.const 5 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 6 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 7 + f64.const 8 + call $~lib/typedarray/Float64Array#__set + local.get $1 i32.const 2 - i32.const 15 - i32.const 2480 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.const 6 + call $~lib/typedarray/Float64Array#subarray + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 - i32.const 264 + i32.const 122 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -4 - i32.const -3 - i32.const -2 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $6 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2528 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 16 + i32.ne if i32.const 0 i32.const 1312 - i32.const 266 + i32.const 123 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -4 - i32.const -3 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $4 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 2576 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.load offset=8 + i32.const 32 + i32.ne if i32.const 0 i32.const 1312 - i32.const 268 + i32.const 124 i32.const 3 call $~lib/builtins/abort unreachable end - 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.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 2624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/isInt32ArrayEqual + global.set $~argumentsLength + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $27 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $28 + i32.const 1 + i32.le_s + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $27 + i32.load offset=4 + local.set $1 + local.get $28 + i32.const 2 + i32.eq + if + local.get $1 + f64.load offset=8 + local.set $23 + local.get $1 + f64.load + local.set $16 + i32.const 2 + global.set $~argumentsLength + local.get $23 + local.get $16 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $16 + f64.store offset=8 + local.get $1 + local.get $23 + f64.store + end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $28 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $28 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $28 + call $~lib/util/sort/weakHeapSort + end + end + local.get $27 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $0 + 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 1312 - i32.const 270 + i32.const 126 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $27 - 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 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - 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 $4 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + i32.const -32 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Uint8ClampedArray#__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 + i32.const 256 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $29 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get if i32.const 0 i32.const 1312 - i32.const 282 + i32.const 135 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 2 i32.ne if i32.const 0 i32.const 1312 - i32.const 283 + i32.const 136 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 - i32.load offset=8 - i32.const 12 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 255 i32.ne if i32.const 0 i32.const 1312 - i32.const 284 + i32.const 137 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#slice - local.tee $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 i32.const 0 - call $~lib/typedarray/Int32Array#__get + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 287 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 + 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 + i32.const 1 i32.const 1 - call $~lib/typedarray/Int32Array#__get i32.const 3 - i32.ne + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1504 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 288 + i32.const 149 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 2 - i32.ne + local.get $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1584 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $27 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 289 + i32.const 152 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 290 + i32.const 155 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=8 - i32.const 8 - i32.ne + local.get $1 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1648 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $24 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 291 + i32.const 158 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $29 + local.get $1 + i32.const 0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#slice - local.tee $28 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 1680 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 294 + i32.const 161 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u + local.get $1 i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 295 + i32.const 165 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $28 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 296 + i32.const 166 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $28 + local.get $0 i32.load offset=8 - i32.const 4 + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 297 + i32.const 167 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 0 + i32.const 14 + i32.const 1712 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 168 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 - local.get $1 + i32.const 5 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.tee $27 - i32.eq + i32.const 14 + i32.const 1744 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 300 + i32.const 169 i32.const 3 call $~lib/builtins/abort unreachable end + local.get $1 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release local.get $27 - i32.load offset=8 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $20 + 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 - i32.shr_u + call $~lib/typedarray/Int32Array#__set local.get $1 - i32.load offset=8 i32.const 2 - i32.shr_u - i32.ne + 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 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1776 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 301 + i32.const 181 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $27 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.ne + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1824 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $27 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 302 + i32.const 184 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $27 - i32.load offset=8 local.get $1 - i32.load offset=8 - i32.ne + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1872 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 1312 - i32.const 303 + i32.const 187 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $29 - 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 - i32.const 3 + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $24 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 190 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1968 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 193 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#subarray + local.tee $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 197 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 198 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 199 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 2 + i32.const 15 + i32.const 2016 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 200 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2048 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 201 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release + i32.const 6 call $~lib/typedarray/Int8Array#constructor - local.tee $29 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $29 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $29 + 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 + i32.const 5 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 6 + call $~lib/typedarray/Int8Array#subarray + local.tee $0 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 + call $~lib/typedarray/Int8Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 222 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.load offset=8 - local.set $27 - loop $for-loop|0 - local.get $0 - local.get $27 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $28 - 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 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 223 + i32.const 3 + call $~lib/builtins/abort + unreachable end - block $folding-inner19 - block $folding-inner18 - block $folding-inner0 - block $folding-inner17 - block $folding-inner16 - 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 - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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-inner2 - 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 - 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-inner2 - 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 - 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-inner2 - 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 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-inner3 - 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-inner3 - 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-inner3 - 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 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-inner3 - 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 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 - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner3 - 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 - block $folding-inner1 - 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 - 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 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 - 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 $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 - 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_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 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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.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 $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 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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.const 0 - call $~lib/rt/tlsf/__alloc - local.set $27 - loop $for-loop|011 - 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 $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 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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 - 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 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner6 - 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-inner4 - local.get $1 + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 224 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 225 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 5 + call $~lib/typedarray/Int8Array#subarray + local.tee $28 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 228 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 229 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 230 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 231 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $27 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 234 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 235 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 236 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 237 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + 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 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $28 + local.get $1 + i32.const 0 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $27 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2096 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 248 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + 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 1 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $24 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2144 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 250 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + 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 2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $21 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2192 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 252 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + 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 2 + 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 2240 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $18 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 254 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + 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 2288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $15 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 256 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $14 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2336 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $13 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 258 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 1 + i32.const 2 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $12 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2384 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 260 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $10 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2432 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 262 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const 0 + i32.const -2 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $8 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2480 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 264 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const -4 + i32.const -3 + i32.const -2 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $6 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2528 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 266 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $0 + call $~lib/rt/pure/__release + local.tee $0 + i32.const -4 + i32.const -3 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $4 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 2576 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 268 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + 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 2624 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 270 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release + local.get $18 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + 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 $4 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + 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 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#subarray + local.tee $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 282 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 283 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 284 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#slice + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 287 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 288 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 289 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 290 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 291 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#slice + local.tee $27 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 294 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 295 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 296 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $27 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 297 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $1 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.tee $26 + i32.eq + if + i32.const 0 + i32.const 1312 + i32.const 300 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $26 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 301 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $26 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 302 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $26 + i32.load offset=8 + local.get $1 + i32.load offset=8 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 303 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $28 + 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 $28 + i32.load offset=4 + local.set $27 + local.get $28 + i32.load offset=8 + local.set $26 + loop $for-loop|0 + local.get $0 + local.get $26 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $0 + local.get $27 + 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-inner9 + block $folding-inner14 + block $folding-inner13 + block $folding-inner12 + block $folding-inner11 + 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 $28 + 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 $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $28 + 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 $28 + i32.load offset=4 + local.set $27 + local.get $28 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $26 + loop $for-loop|00 + local.get $0 + local.get $26 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $27 + 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 $28 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $28 + 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 $28 + i32.load offset=4 + local.set $27 + local.get $28 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $26 + loop $for-loop|01 + local.get $0 + local.get $26 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $27 + 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 $28 + 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 $28 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $27 + loop $for-loop|02 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $22 + local.get $28 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $22 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|02 + end + end + local.get $22 + 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 + f64.const 0 + local.set $23 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=4 + local.set $28 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $27 + loop $for-loop|03 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $23 + local.get $28 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $23 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|03 + end + end + local.get $23 + 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 $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $28 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + local.get $28 + i32.load offset=4 + local.set $27 + local.get $28 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|04 + local.get $1 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $1 + local.get $27 + 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 $28 + 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 $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $28 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $28 + i32.load offset=4 + local.set $27 + local.get $28 + 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 $0 + local.get $27 + 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 $28 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $28 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $28 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $28 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $28 + i32.load offset=4 + local.set $27 + local.get $28 + 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 $0 + local.get $27 + 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 + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $28 + 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 $22 + local.get $1 + i32.load offset=4 + local.set $28 + 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 $22 + local.get $28 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $22 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end + end + local.get $22 + 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 $23 + local.get $1 + i32.load offset=4 + local.set $28 + 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 $23 + local.get $28 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $23 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end + end + local.get $23 + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $1 + 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 $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-inner2 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner3 + 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-inner2 + local.get $1 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner3 + 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-inner4 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner4 + local.get $1 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + 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-inner6 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner7 + 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-inner6 + local.get $1 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner7 + 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 2704 + 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 2704 + 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 2704 + 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 $28 + local.get $0 + i32.load offset=8 + local.set $27 + loop $for-loop|09 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $28 + 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|09 + end + end + 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/Uint8Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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-inner8 + 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 2704 + 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 2704 + 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 2704 + 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-inner8 + 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 2704 + 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 2704 + 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 2704 + 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 $28 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + loop $for-loop|010 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $28 + 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|010 + end + end + 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/Uint16Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 $28 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + loop $for-loop|011 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $28 + 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|011 + end + end + 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/Int32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner8 + 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 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner8 + 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 2704 + 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 2704 + 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 2704 + 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-inner8 + 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 2704 + 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 2704 + 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 2704 + 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-inner8 + 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 2704 + 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 2704 + 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 2704 + 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 $28 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $27 + loop $for-loop|012 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $28 + 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|012 + end + end + 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/Float64Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 2704 + 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 2704 + 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 2704 + 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 $28 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $27 + loop $for-loop|013 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $28 + 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|013 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $28 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $28 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 607 + i32.const 3 + 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 $28 + i32.load offset=8 + i32.const 3 + 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/Float64Array,f64>|inlined.0 + local.get $28 + i32.load offset=4 + local.set $24 + loop $while-continue|0 + local.get $1 + local.get $27 + i32.lt_s + if + local.get $24 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $23 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 + else + local.get $23 + local.get $23 f64.ne - br_if $folding-inner5 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner6 - 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-inner7 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - 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 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-inner7 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - 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 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-inner7 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - 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 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-inner7 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - 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 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-inner7 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - 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 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-inner7 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - 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 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-inner7 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - 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 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-inner7 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - 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 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-inner7 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - 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 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-inner7 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - 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 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-inner7 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - 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 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-inner9 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - 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 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-inner9 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner10 - 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-inner11 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner12 - 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-inner11 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner12 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - 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-inner13 - 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 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 2704 - 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 2704 - 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 2704 - 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-inner13 - 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 1312 - i32.const 607 - i32.const 3 - 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 1312 - i32.const 608 - i32.const 3 - 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 1312 - i32.const 613 - i32.const 3 - 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 1312 - i32.const 614 - i32.const 3 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 - local.get $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 $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $29 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.get $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 $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - local.get $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - local.get $29 - call $~lib/rt/pure/__release - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner0 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner18 - 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $29 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - 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 + end + if 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $29 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - 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 1312 - i32.const 691 - i32.const 3 - 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 1312 - i32.const 695 - i32.const 3 - 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 $29 - i32.const 0 - 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 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $28 - i32.const 0 - 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 + 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 1312 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $27 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $27 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $26 + if (result i32) + i32.const 0 + local.get $26 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $27 + i32.load offset=4 + local.set $25 + loop $while-continue|014 + local.get $0 + local.get $26 + i32.lt_s + if + local.get $25 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $22 + f32.const nan:0x400000 + f32.eq + if (result i32) i32.const 1 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner19 - local.get $0 - i32.load offset=4 + else + local.get $22 + local.get $22 + f32.ne + end + if i32.const 1 - i32.add - local.set $26 - 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 $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 - f32.load - local.tee $21 - local.get $21 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $21 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|026 - end - end - local.get $0 - local.get $28 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - i32.const 0 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-inner19 - 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 8352 - 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 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 $25 - i32.const 0 - 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 - 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.get $0 - i32.load offset=8 - i32.gt_s - br_if $folding-inner19 - local.get $0 - i32.load offset=4 - local.set $23 - local.get $1 - i32.load offset=4 - 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 - local.get $23 - local.get $26 - i32.add - i32.const 255 - local.get $19 - local.get $26 - 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 $26 - i32.const 1 - i32.add - 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 - i32.const 21 - i32.const 8384 - 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 - 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 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 end - br $folding-inner3 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|014 end - i32.const 0 - i32.const 1312 - i32.const 323 - i32.const 3 - call $~lib/builtins/abort - unreachable end + end + local.get $1 + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $28 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner11 + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $28 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner11 + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $28 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/rt/pure/__release + local.get $28 + 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 $28 + i32.load offset=8 + if + i32.const 0 + i32.const 1312 + i32.const 691 + i32.const 3 + 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 $28 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + if i32.const 0 i32.const 1312 - i32.const 344 + i32.const 695 i32.const 3 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 $28 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $28 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $28 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $27 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $27 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $26 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $26 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $0 + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner9 + local.get $1 + i32.load offset=4 + i32.const 1 + i32.add + local.set $25 + local.get $28 + i32.load offset=4 + local.set $21 + local.get $28 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $20 + loop $for-loop|014 + local.get $0 + local.get $20 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $21 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $22 + local.get $22 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $22 + 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|014 + end + end + local.get $1 + local.get $27 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.const 0 + local.set $0 + local.get $26 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 8 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner9 + local.get $1 + i32.load offset=4 + i32.const 8 + i32.add + local.set $25 + local.get $26 + i32.load offset=4 + local.set $21 + local.get $26 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $20 + loop $for-loop|015 + local.get $0 + local.get $20 + i32.lt_s + if + local.get $0 + local.get $25 + i32.add + local.get $21 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $24 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $24 + i32.const 255 + local.get $24 + 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|015 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 8352 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $21 + 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 $24 i32.const 0 - i32.const 1312 - i32.const 365 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $24 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $24 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $24 i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 300 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $25 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner9 + local.get $1 + i32.load offset=4 + local.set $20 + 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 + loop $for-loop|016 + local.get $25 + local.get $18 + i32.lt_s + if + local.get $20 + local.get $25 + i32.add + i32.const 255 + local.get $19 + local.get $25 + 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 $25 + i32.const 1 + i32.add + local.set $25 + br $for-loop|016 + end + end + local.get $1 + local.get $24 + 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 8384 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $25 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $1 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + return end i32.const 0 i32.const 1312 - i32.const 366 + i32.const 323 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 367 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 0be026c881..9bfed9e314 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -464,17 +464,17 @@ global.get $~lib/math/random_state1_64 local.tee $0 global.set $~lib/math/random_state0_64 - local.get $0 - local.get $1 local.get $1 i64.const 23 i64.shl + local.get $1 i64.xor local.tee $1 local.get $1 i64.const 17 i64.shr_u i64.xor + local.get $0 i64.xor local.get $0 i64.const 26 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index a6b3c174ca..6daf4f5e61 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1725,61 +1725,61 @@ i32.const 13 i32.add call $~lib/rt/stub/__alloc - local.tee $6 + local.tee $7 i32.const 8 i32.add local.tee $8 i32.const 4 i32.add - local.set $7 - local.get $6 + local.set $6 local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 i64.const 9071406388179572 i64.store - local.get $6 + local.get $7 i32.const 7 i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $6 + local.get $7 i32.const 1040 i32.const 1040 call $~lib/string/String#get:length - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop local.get $0 - if (result i32) - local.get $7 + if + local.get $6 i32.const 32 i32.store8 - local.get $6 local.get $7 + local.get $6 i32.const 1 i32.add - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 local.get $1 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1788,18 +1788,18 @@ i32.const 1 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $2 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1808,18 +1808,18 @@ i32.const 2 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $3 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1828,18 +1828,18 @@ i32.const 3 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $4 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1848,18 +1848,18 @@ i32.const 4 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $5 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1868,29 +1868,29 @@ end end end - local.get $7 + local.get $6 i32.const 1 i32.sub - else - local.get $7 + local.set $6 end + local.get $6 i32.const 10 i32.store8 - local.get $6 + local.get $7 i32.const 1 i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $6 + local.get $7 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $6 + local.get $7 select i32.eqz if @@ -1899,7 +1899,7 @@ call $~lib/wasi/index/abort unreachable end - local.get $6 + local.get $7 i32.const 16 i32.sub local.tee $0 @@ -1913,7 +1913,7 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $6 + local.get $7 local.get $0 i32.load i32.add diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 9ea9f5e9ae..301e42a6d2 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1052,7 +1052,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 global.set $while/ran i32.const 10 @@ -1153,16 +1152,18 @@ global.set $while/ran i32.const 0 global.set $while/ran + i32.const 0 + local.set $1 loop $while-continue|01 - local.get $3 + local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $1 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $3 + local.get $1 i32.const 10 i32.ne if @@ -1176,17 +1177,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $3 + local.set $1 loop $while-continue|002 - local.get $3 + local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $1 i32.const 10 i32.ne br_if $while-continue|002 end - local.get $3 + local.get $1 i32.const 10 i32.ne if @@ -1212,18 +1213,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $3 - loop $while-continue|02 - local.get $3 + local.set $1 + loop $while-continue|04 + local.get $1 if - local.get $3 + local.get $1 i32.const 1 i32.sub - local.set $3 - br $while-continue|02 + local.set $1 + br $while-continue|04 end end - local.get $3 + local.get $1 if i32.const 0 i32.const 1040 @@ -1283,16 +1284,16 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $3 + local.set $2 call $while/Ref#constructor local.set $1 - loop $while-continue|04 + loop $while-continue|02 local.get $1 if - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.eq if @@ -1311,10 +1312,10 @@ end local.get $0 local.set $1 - br $while-continue|04 + br $while-continue|02 end end - local.get $3 + local.get $2 i32.const 10 i32.ne if @@ -1351,20 +1352,20 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $3 + local.set $2 call $while/Ref#constructor local.set $1 loop $while-continue|05 block $while-break|0 call $while/Ref#constructor - local.tee $2 + local.tee $0 call $~lib/rt/pure/__release - local.get $2 + local.get $0 if - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.eq if @@ -1381,7 +1382,7 @@ end end end - local.get $3 + local.get $2 i32.const 10 i32.ne if From bcd5e8d20dfdf13feef05120f4dd1faebc8ad61f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 21 Apr 2020 00:07:21 +0300 Subject: [PATCH 31/34] Revert "try other approach" This reverts commit 3b9f94655d7d77b4c37bb0d9315b61c42a1b3975. --- cli/asc.js | 5 +- tests/compiler/assert-nonnull.optimized.wat | 14 +- tests/compiler/do.optimized.wat | 33 +- .../extends-baseaggregate.optimized.wat | 44 +- tests/compiler/for.optimized.wat | 36 +- .../implicit-getter-setter.optimized.wat | 54 +- tests/compiler/infer-array.optimized.wat | 20 +- tests/compiler/infer-generic.optimized.wat | 12 +- tests/compiler/instanceof-class.optimized.wat | 7 +- tests/compiler/issues/1095.optimized.wat | 17 +- tests/compiler/number.optimized.wat | 79 +- tests/compiler/possibly-null.optimized.wat | 8 +- .../rc/logical-and-mismatch.optimized.wat | 12 +- .../rc/logical-or-mismatch.optimized.wat | 14 +- tests/compiler/rc/rereturn.optimized.wat | 52 +- tests/compiler/resolve-access.optimized.wat | 17 +- tests/compiler/resolve-binary.optimized.wat | 119 +- .../resolve-elementaccess.optimized.wat | 41 +- .../resolve-function-expression.optimized.wat | 6 +- tests/compiler/resolve-new.optimized.wat | 6 +- .../resolve-propertyaccess.optimized.wat | 17 +- tests/compiler/resolve-ternary.optimized.wat | 52 +- tests/compiler/resolve-unary.optimized.wat | 17 +- .../retain-release-sanity.optimized.wat | 171 +- tests/compiler/rt/stub-realloc.optimized.wat | 16 +- tests/compiler/runtime-full.optimized.wat | 52 +- .../compiler/std/array-literal.optimized.wat | 54 +- tests/compiler/std/array.optimized.wat | 2475 +- tests/compiler/std/arraybuffer.optimized.wat | 76 +- tests/compiler/std/dataview.optimized.wat | 62 +- tests/compiler/std/libm.optimized.wat | 118 +- tests/compiler/std/map.optimized.wat | 3440 +-- tests/compiler/std/math.optimized.wat | 114 +- .../compiler/std/object-literal.optimized.wat | 23 +- .../std/operator-overloading.optimized.wat | 4 +- tests/compiler/std/pointer.optimized.wat | 2 +- tests/compiler/std/set.optimized.wat | 3188 +-- tests/compiler/std/staticarray.optimized.wat | 54 +- .../std/string-casemapping.optimized.wat | 157 +- .../std/string-encoding.optimized.wat | 96 +- tests/compiler/std/string.optimized.wat | 66 +- tests/compiler/std/symbol.optimized.wat | 142 +- tests/compiler/std/typedarray.optimized.wat | 21415 ++++++++-------- tests/compiler/wasi/seed.optimized.wat | 4 +- tests/compiler/wasi/trace.optimized.wat | 82 +- tests/compiler/while.optimized.wat | 55 +- 46 files changed, 16153 insertions(+), 16395 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index f3cf62ce63..1539fe0f69 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -720,10 +720,10 @@ exports.main = function main(argv, options, callback) { add("post-assemblyscript"); } add("dce"); - add("inlining"); // differs add("remove-unused-brs"); add("remove-unused-names"); - add("optimize-instructions"); // differs + add("optimize-instructions"); + add("inlining"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs @@ -743,7 +743,6 @@ exports.main = function main(argv, options, callback) { } add("simplify-locals-nostructure"); add("vacuum"); - add("inlining-optimizing"); // differs add("reorder-locals"); add("remove-unused-brs"); // if (optimizeLevel >= 3 || shrinkLevel >= 2) { // do it later diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 870af63c48..7422e8e1e5 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -140,9 +140,10 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get local.tee $0 local.get $0 @@ -166,9 +167,10 @@ (local $1 i32) block $folding-inner0 local.get $0 + local.tee $1 i32.eqz br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/array/Array#__get local.tee $0 local.get $0 @@ -213,8 +215,8 @@ (local $1 i32) local.get $0 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -235,8 +237,8 @@ local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index bf359b5e58..89af7877dd 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1047,7 +1047,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 global.set $do/ran i32.const 10 @@ -1188,14 +1187,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|06 + loop $do-continue|03 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|06 + br_if $do-continue|03 end local.get $1 i32.const 10 @@ -1216,7 +1215,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 @@ -1233,7 +1232,7 @@ i32.rem_s br_if $do-continue|1 end - br $do-continue|03 + br $do-continue|04 end end local.get $0 @@ -1264,11 +1263,11 @@ global.set $do/ran call $do/Ref#constructor local.set $0 - loop $do-continue|04 - local.get $3 + loop $do-continue|05 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 10 i32.eq if @@ -1287,9 +1286,9 @@ end local.get $1 local.tee $0 - br_if $do-continue|04 + br_if $do-continue|05 end - local.get $3 + local.get $2 i32.const 10 i32.ne if @@ -1325,10 +1324,12 @@ end i32.const 0 global.set $do/ran + i32.const 0 + local.set $2 call $do/Ref#constructor local.set $0 - loop $do-continue|045 - block $do-break|05 + loop $do-continue|06 + block $do-break|0 local.get $2 i32.const 1 i32.add @@ -1343,13 +1344,13 @@ end i32.const 0 local.set $0 - br $do-break|05 + br $do-break|0 end call $do/Ref#constructor - local.tee $3 + local.tee $1 call $~lib/rt/pure/__release - local.get $3 - br_if $do-continue|045 + local.get $1 + br_if $do-continue|06 end end local.get $2 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 6a1928e13b..e0b0674624 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -916,9 +916,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -927,14 +927,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -943,18 +943,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -966,9 +966,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -985,7 +985,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -993,9 +993,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1007,11 +1007,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1021,23 +1021,23 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index dbad2a045a..2a8bdf7dc8 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1161,12 +1161,12 @@ global.set $for/ran i32.const 10 local.set $1 - loop $for-loop|04 + loop $for-loop|03 local.get $1 i32.const 1 i32.sub local.tee $1 - br_if $for-loop|04 + br_if $for-loop|03 end local.get $1 if @@ -1183,14 +1183,14 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|06 + loop $for-loop|05 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $for-loop|06 + br_if $for-loop|05 end local.get $1 i32.const 10 @@ -1263,7 +1263,7 @@ global.set $for/ran call $for/Ref#constructor local.set $1 - loop $for-loop|03 + loop $for-loop|04 local.get $1 if local.get $3 @@ -1288,7 +1288,7 @@ end local.get $0 local.set $1 - br $for-loop|03 + br $for-loop|04 end end local.get $3 @@ -1329,14 +1329,14 @@ global.set $for/ran call $for/Ref#constructor call $for/Ref#constructor - local.set $1 + local.set $0 call $~lib/rt/pure/__release - loop $for-loop|05 + loop $for-loop|06 block $for-break0 call $for/Ref#constructor - local.tee $0 + local.tee $1 call $~lib/rt/pure/__release - local.get $0 + local.get $1 if local.get $2 i32.const 1 @@ -1345,20 +1345,20 @@ i32.const 10 i32.eq if - local.get $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 - local.set $1 + local.set $0 br $for-break0 end call $for/Ref#constructor - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.set $1 - br $for-loop|05 + local.set $0 + br $for-loop|06 end end end @@ -1373,7 +1373,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1384,7 +1384,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 b55ef1d27d..454a19e0c9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -913,15 +913,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -929,14 +929,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -945,18 +945,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -967,18 +967,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -987,7 +987,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -995,9 +995,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1009,11 +1009,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1023,25 +1023,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 4d93f0286b..ddcc193399 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -288,7 +288,6 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/stub/__alloc @@ -296,26 +295,27 @@ local.get $0 local.get $1 i32.shl - local.tee $4 - local.set $6 - local.get $4 + local.tee $1 + local.set $5 + local.get $1 i32.const 0 call $~lib/rt/stub/__alloc - local.set $1 + local.set $4 local.get $3 if - local.get $1 + local.get $4 local.get $3 - local.get $6 + local.get $5 call $~lib/memory/memory.copy end - local.get $1 + local.get $4 + local.tee $3 i32.store local.get $2 - local.get $1 + local.get $3 i32.store offset=4 local.get $2 - local.get $4 + local.get $1 i32.store offset=8 local.get $2 local.get $0 diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 509f352db5..8f605b0703 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -39,20 +39,20 @@ (local $3 i32) i32.const 1132 i32.load - local.set $1 + local.set $2 loop $for-loop|0 local.get $0 - local.get $1 + local.get $2 i32.const 1132 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 - local.get $3 + local.get $1 i32.const 1124 i32.load local.get $0 @@ -63,7 +63,7 @@ local.get $0 i32.const 1120 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/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index e1d5c7c1c4..0a53353118 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -92,12 +92,13 @@ i32.const 6 call $~lib/rt/stub/__alloc local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 5 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 global.set $instanceof-class/b block $__inlined_func$instanceof-class/Child~instanceof (result i32) i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index ca1f767a6d..555c78f813 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -968,9 +968,8 @@ i32.store local.get $1 local.tee $0 - local.tee $2 i32.load - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -981,21 +980,21 @@ unreachable end local.get $2 + local.get $0 i32.load - local.tee $0 - local.get $1 + local.tee $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $2 + local.get $1 call $~lib/rt/pure/__release end + local.get $0 local.get $2 - local.get $1 i32.store - local.get $2 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index bd0b376801..86a856737f 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -190,45 +190,44 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 1040 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + if (result i32) 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 + 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 - i32.const 45 - i32.store16 + else + i32.const 1040 end - local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -1457,7 +1456,7 @@ i32.const 2544 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1482,7 +1481,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -1495,7 +1494,7 @@ unreachable end i32.const -5 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -1508,7 +1507,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -1525,7 +1524,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2464 call $~lib/string/String.__eq i32.eqz @@ -1542,7 +1541,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1584,7 +1583,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1602,7 +1601,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2464 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index cb9bd243f8..8a344aa5aa 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 - local.get $0 - local.get $1 - select - local.set $0 + if + local.get $1 + local.set $0 + end br $while-continue|0 end end diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 3884f01a39..6a906a7a83 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -966,14 +966,14 @@ global.set $rc/logical-and-mismatch/gloRef call $rc/logical-and-mismatch/Ref#constructor local.tee $0 - if (result i32) + if local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain - else - local.get $0 + local.set $0 end + local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef local.tee $0 @@ -986,13 +986,13 @@ call $~lib/rt/pure/__release call $rc/logical-and-mismatch/Ref#constructor local.tee $0 - if (result i32) + if local.get $0 call $~lib/rt/pure/__release call $rc/logical-and-mismatch/Ref#constructor - else - local.get $0 + local.set $0 end + local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 82d1e68b88..946c55476b 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -966,14 +966,15 @@ global.set $rc/logical-or-mismatch/gloRef call $rc/logical-or-mismatch/Ref#constructor local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__retain + local.set $0 end + local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef local.tee $0 @@ -986,13 +987,14 @@ call $~lib/rt/pure/__release call $rc/logical-or-mismatch/Ref#constructor local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if local.get $0 call $~lib/rt/pure/__release call $rc/logical-or-mismatch/Ref#constructor + local.set $0 end + local.get $0 call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 0a40a50754..160b6e5eb6 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -899,15 +899,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -915,14 +915,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -931,18 +931,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -953,18 +953,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -973,7 +973,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -981,9 +981,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -995,11 +995,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1009,23 +1009,23 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 01b1ea4b45..0c21077548 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -433,13 +433,13 @@ i64.const 10 i64.div_u local.set $0 + local.get $2 local.get $1 i32.const 1 i32.sub local.tee $1 i32.const 1 i32.shl - local.get $2 i32.add local.get $4 i32.const 48 @@ -522,26 +522,27 @@ local.tee $0 i64.const 1 i64.store - i32.const 1184 - local.set $1 local.get $0 i64.load i32.wrap_i64 - local.tee $0 + local.tee $1 if - local.get $0 + 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 $1 - local.get $0 + local.tee $0 + local.get $1 local.get $2 call $~lib/util/number/utoa_simple + else + i32.const 1184 + local.set $0 end - local.get $1 + local.get $0 ) (func $~start i32.const 1200 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 41fde02f73..3f30383508 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -319,46 +319,45 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 1200 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + if (result i32) 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 + 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/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 1200 end - local.get $2 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) @@ -1518,7 +1517,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1535,7 +1534,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1552,7 +1551,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1569,7 +1568,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1598,7 +1597,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1615,7 +1614,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1632,7 +1631,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 2512 call $~lib/string/String.__eq i32.eqz @@ -1649,7 +1648,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1666,7 +1665,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1683,7 +1682,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1700,7 +1699,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 2544 call $~lib/string/String.__eq i32.eqz @@ -1717,7 +1716,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1730,7 +1729,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1743,7 +1742,7 @@ unreachable end i32.const -1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2576 call $~lib/string/String.__eq i32.eqz @@ -1756,7 +1755,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1769,7 +1768,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1782,7 +1781,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1807,7 +1806,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2512 call $~lib/string/String.__eq i32.eqz @@ -1820,7 +1819,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1833,7 +1832,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1846,7 +1845,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1859,7 +1858,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1872,7 +1871,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1885,7 +1884,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1898,7 +1897,7 @@ unreachable end i32.const 0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1200 call $~lib/string/String.__eq i32.eqz @@ -1911,7 +1910,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1924,7 +1923,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 46f8e8e8c0..c42f7a7633 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1718,9 +1718,9 @@ unreachable end global.get $~lib/rt/stub/offset + local.get $1 local.get $3 i32.load - local.get $1 i32.add i32.eq if @@ -1875,29 +1875,31 @@ i32.add i32.load8_u ) - (func $~lib/util/number/itoa (param $0 i32) (result i32) + (func $~lib/number/U8#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 2624 - local.set $1 - local.get $0 - i32.const 255 - i32.and - local.tee $0 - if + block $__inlined_func$~lib/util/number/utoa32 (result i32) + i32.const 2624 local.get $0 + i32.const 255 + i32.and + local.tee $1 + i32.eqz + br_if $__inlined_func$~lib/util/number/utoa32 + drop + local.get $1 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $0 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 + local.get $1 local.get $0 - local.get $2 call $~lib/util/number/utoa_simple + local.get $2 end - local.get $1 ) (func $start:resolve-elementaccess (local $0 i32) @@ -1999,13 +2001,14 @@ i32.const 7 call $~lib/rt/stub/__alloc local.tee $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 12 i32.const 8 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/buf @@ -2020,7 +2023,7 @@ global.get $resolve-elementaccess/buf i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2656 call $~lib/string/String.__eq i32.eqz @@ -2035,7 +2038,7 @@ global.get $resolve-elementaccess/buf i32.const 1 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2688 call $~lib/string/String.__eq i32.eqz @@ -2059,7 +2062,7 @@ local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2720 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index c45ef9ad6e..6bb92a3959 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -172,16 +172,16 @@ local.set $1 local.get $2 if - local.get $0 + local.get $3 i32.load16_u local.tee $2 - local.get $3 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $2 local.get $4 + local.get $2 i32.sub return end diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 83de4829d8..b06a5f2b6d 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -4,7 +4,7 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $resolve-new/Foo#constructor + (func $~lib/rt/stub/__alloc (local $0 i32) (local $1 i32) (local $2 i32) @@ -72,7 +72,7 @@ (func $~start i32.const 1024 global.set $~lib/rt/stub/offset - call $resolve-new/Foo#constructor - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc + call $~lib/rt/stub/__alloc ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 0840531aee..2297f6e46d 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -120,15 +120,14 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $2 - local.tee $1 + local.get $1 local.get $0 i32.const 10 i32.ge_u @@ -175,26 +174,26 @@ i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $5 + local.tee $3 local.set $4 loop $do-continue|0 local.get $0 i32.const 10 i32.rem_u - local.set $3 + local.set $5 local.get $0 i32.const 10 i32.div_u local.set $0 + local.get $4 local.get $2 i32.const 1 i32.sub local.tee $2 i32.const 1 i32.shl - local.get $4 i32.add - local.get $3 + local.get $5 i32.const 48 i32.add i32.store16 @@ -203,11 +202,11 @@ end local.get $1 if - local.get $5 + local.get $3 i32.const 45 i32.store16 end - local.get $5 + local.get $3 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index e83b7757a0..d0f016834d 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -917,15 +917,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -933,14 +933,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -949,18 +949,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -971,18 +971,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -991,7 +991,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -999,9 +999,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1013,11 +1013,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1027,23 +1027,23 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 51ae97c282..148c781efa 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -127,15 +127,14 @@ local.get $0 i32.const 31 i32.shr_u - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 i32.sub local.set $0 end - local.get $2 - local.tee $1 + local.get $1 local.get $0 i32.const 10 i32.ge_u @@ -182,26 +181,26 @@ i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $5 + local.tee $3 local.set $4 loop $do-continue|0 local.get $0 i32.const 10 i32.rem_u - local.set $3 + local.set $5 local.get $0 i32.const 10 i32.div_u local.set $0 + local.get $4 local.get $2 i32.const 1 i32.sub local.tee $2 i32.const 1 i32.shl - local.get $4 i32.add - local.get $3 + local.get $5 i32.const 48 i32.add i32.store16 @@ -210,11 +209,11 @@ end local.get $1 if - local.get $5 + local.get $3 i32.const 45 i32.store16 end - local.get $5 + local.get $3 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index da8f46a05b..aaed61f712 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -922,9 +922,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -933,14 +933,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -949,18 +949,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -972,9 +972,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -991,7 +991,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -999,9 +999,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1013,11 +1013,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1027,25 +1027,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1769,7 +1769,7 @@ i32.const 12 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 12 call $~lib/memory/memory.fill i32.const 16 @@ -1788,9 +1788,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $4 @@ -1806,7 +1805,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 12 @@ -1820,7 +1819,7 @@ call $~lib/array/Array#push local.get $3 i32.load offset=12 - local.tee $1 + local.tee $2 i32.const 1 i32.lt_s if @@ -1833,24 +1832,24 @@ end local.get $3 i32.load offset=4 - local.get $1 + local.get $2 i32.const 1 i32.sub - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load drop local.get $3 - local.get $1 + local.get $2 i32.store offset=12 local.get $3 call $~lib/rt/pure/__release i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1869,9 +1868,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $4 @@ -1887,7 +1885,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 0 @@ -1897,14 +1895,14 @@ i32.store offset=12 local.get $3 loop $for-loop|0 - local.get $2 + local.get $1 i32.const 10 i32.lt_s if i32.const 0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 call $~lib/memory/memory.fill i32.const 16 @@ -1923,9 +1921,8 @@ local.get $3 i32.const 0 i32.store offset=12 - local.get $1 - local.set $0 - local.get $1 + local.get $2 + local.tee $0 local.get $3 i32.load local.tee $5 @@ -1941,7 +1938,7 @@ local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.store offset=4 local.get $3 i32.const 0 @@ -1959,21 +1956,21 @@ local.get $3 local.get $3 i32.load offset=12 - local.tee $1 + local.tee $5 i32.const 1 i32.add - local.tee $5 + local.tee $2 call $~lib/array/ensureSize local.get $3 i32.load offset=4 - local.get $1 + local.get $5 i32.const 2 i32.shl i32.add i32.const 1344 i32.store local.get $3 - local.get $5 + local.get $2 i32.store offset=12 local.get $0 i32.const 1 @@ -1984,10 +1981,10 @@ end local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end @@ -1995,103 +1992,97 @@ i32.const 1360 i32.const 1392 call $~lib/string/String.__concat - local.tee $3 + local.tee $1 i32.const 1456 call $~lib/string/String.__concat - local.get $3 + local.get $1 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 $2 i32.const 0 i32.store i32.const 4 i32.const 7 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.set $0 - local.get $1 local.get $3 - local.tee $4 + local.tee $0 + local.get $2 + local.tee $1 i32.load - local.tee $2 + local.tee $4 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $1 local.get $0 i32.store local.get $1 - local.set $2 - local.get $4 local.set $0 - local.get $1 local.get $3 + 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 - i32.store local.get $1 - local.set $2 + i32.store + local.get $0 + local.tee $1 local.get $3 - local.get $1 + local.tee $0 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 $2 local.get $0 + local.get $1 i32.store - local.get $3 - local.set $0 - local.get $3 local.get $2 + local.tee $1 + local.get $0 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 $2 local.get $0 - i32.store - local.get $2 - local.set $0 - local.get $3 - local.set $2 local.get $1 + i32.store local.get $3 + local.get $2 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2102,27 +2093,27 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $1 local.get $0 i32.store + local.get $2 local.get $3 - local.get $1 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 $3 local.get $1 - local.get $2 i32.store - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 75fdb067eb..9fe92e6df9 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -531,14 +531,12 @@ end global.get $rt/stub-realloc/ptr local.tee $0 - if (result i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - else - i32.const 0 - end + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select i32.eqz if i32.const 0 @@ -564,9 +562,9 @@ unreachable end global.get $~lib/rt/stub/offset + local.get $0 local.get $1 i32.load - local.get $0 i32.add i32.eq if diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index feefb2fd3e..fa32ef6903 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -899,15 +899,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -915,14 +915,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -931,18 +931,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -953,18 +953,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -973,7 +973,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -981,9 +981,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -995,11 +995,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1009,23 +1009,23 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 878977b218..ddd2247e86 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -951,15 +951,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -967,14 +967,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -983,18 +983,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1005,18 +1005,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -1025,7 +1025,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -1033,9 +1033,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1047,11 +1047,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1061,25 +1061,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index c97b37a518..e81a55fa75 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -6,13 +6,13 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (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))) @@ -1139,9 +1139,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -1149,14 +1149,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -1165,18 +1165,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1188,9 +1188,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -1207,7 +1207,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1215,9 +1215,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1229,11 +1229,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1243,25 +1243,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -3995,135 +3995,6 @@ local.get $4 f32.store ) - (func $~lib/array/Array#sort (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 f32) - (local $7 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - 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 $2 - local.get $1 - i32.const 2 - i32.eq - if - local.get $2 - f32.load offset=4 - local.tee $6 - local.get $2 - f32.load - local.tee $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $5 - f32.store offset=4 - local.get $2 - local.get $6 - f32.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $1 - i32.const 256 - i32.lt_s - if - local.get $2 - local.set $4 - local.get $1 - local.set $3 - loop $for-loop|0 - local.get $7 - local.get $3 - i32.lt_s - if - local.get $4 - local.get $7 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $6 - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $2 - local.tee $1 - i32.const 1 - i32.sub - local.set $2 - local.get $4 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $5 - f32.store - br $while-continue|1 - end - end - end - local.get $4 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - f32.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - else - local.get $2 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) @@ -4404,214 +4275,85 @@ local.get $4 f64.store ) - (func $~lib/array/Array#sort (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + local.get $2 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $2 + local.get $1 + i64.reinterpret_f64 + local.tee $3 + local.get $3 + i64.const 63 + i64.shr_s + i64.const 1 + i64.shr_u + i64.xor + local.tee $3 + i64.gt_s + local.get $2 + local.get $3 + i64.lt_s + i32.sub + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) + local.get $1 local.get $0 i32.load offset=12 - local.tee $1 - i32.const 1 - i32.le_s + i32.ge_u if - local.get $0 - call $~lib/rt/pure/__retain - return + i32.const 1504 + i32.const 1088 + i32.const 104 + i32.const 42 + call $~lib/builtins/abort + unreachable end local.get $0 i32.load offset=4 - local.set $2 local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/util/sort/weakHeapSort (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) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u i32.const 2 - i32.eq - if - local.get $2 - f64.load offset=8 - local.tee $6 - local.get $2 - f64.load - local.tee $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.shl + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $5 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|0 + local.get $4 i32.const 0 - i32.lt_s - if - local.get $2 - local.get $5 - f64.store offset=8 - local.get $2 - local.get $6 - f64.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $1 - i32.const 256 - i32.lt_s - if - local.get $2 - local.set $4 - local.get $1 - local.set $3 - loop $for-loop|0 - local.get $7 - local.get $3 - i32.lt_s - if - local.get $4 - local.get $7 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $7 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $6 - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $2 - local.tee $1 - i32.const 1 - i32.sub - local.set $2 - local.get $4 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $5 - f64.store - br $while-continue|1 - end - end - end - local.get $4 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - else - local.get $2 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 - i64.reinterpret_f64 - local.tee $2 - local.get $2 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.tee $2 - local.get $1 - i64.reinterpret_f64 - local.tee $3 - local.get $3 - i64.const 63 - i64.shr_s - i64.const 1 - i64.shr_u - i64.xor - local.tee $3 - i64.gt_s - local.get $2 - local.get $3 - i64.lt_s - i32.sub - ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 1504 - i32.const 1088 - i32.const 104 - i32.const 42 - 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/util/sort/weakHeapSort (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) - local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $5 - i32.const 0 - local.get $3 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 - i32.sub - local.set $4 - loop $for-loop|0 - local.get $4 - i32.const 0 - i32.gt_s + i32.gt_s if local.get $4 local.set $3 @@ -4619,12 +4361,12 @@ local.get $3 i32.const 1 i32.and + local.get $5 local.get $3 i32.const 6 i32.shr_u i32.const 2 i32.shl - local.get $5 i32.add i32.load local.get $3 @@ -4644,34 +4386,34 @@ br $while-continue|1 end end + local.get $0 local.get $3 i32.const 1 i32.shr_s - local.tee $6 + local.tee $7 i32.const 2 i32.shl - local.get $0 i32.add i32.load local.tee $3 + local.get $0 local.get $4 i32.const 2 i32.shl - local.get $0 i32.add i32.load - local.tee $7 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $5 local.get $4 i32.const 5 i32.shr_u i32.const 2 i32.shl - local.get $5 i32.add local.tee $8 local.get $8 @@ -4683,19 +4425,19 @@ i32.shl i32.xor i32.store + local.get $0 local.get $4 i32.const 2 i32.shl - local.get $0 i32.add local.get $3 i32.store - local.get $6 + local.get $0 + local.get $7 i32.const 2 i32.shl - local.get $0 i32.add - local.get $7 + local.get $6 i32.store end local.get $4 @@ -4718,10 +4460,10 @@ i32.load local.set $1 local.get $0 + local.get $0 local.get $4 i32.const 2 i32.shl - local.get $0 i32.add local.tee $3 i32.load @@ -4732,12 +4474,12 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $5 local.get $1 i32.const 5 i32.shr_u i32.const 2 i32.shl - local.get $5 i32.add i32.load local.get $1 @@ -4767,27 +4509,27 @@ local.get $0 i32.load local.tee $3 + local.get $0 local.get $1 i32.const 2 i32.shl - local.get $0 i32.add i32.load - local.tee $7 + local.tee $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $5 local.get $1 i32.const 5 i32.shr_u i32.const 2 i32.shl - local.get $5 i32.add - local.tee $6 - local.get $6 + local.tee $7 + local.get $7 i32.load i32.const 1 local.get $1 @@ -4796,15 +4538,15 @@ i32.shl i32.xor i32.store + local.get $0 local.get $1 i32.const 2 i32.shl - local.get $0 i32.add local.get $3 i32.store local.get $0 - local.get $7 + local.get $6 i32.store end local.get $1 @@ -4846,7 +4588,7 @@ (local $8 i32) local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.le_s if @@ -4856,54 +4598,54 @@ end local.get $0 i32.load offset=4 - local.set $5 - local.get $2 + local.set $2 + local.get $3 i32.const 2 i32.eq if - local.get $5 + local.get $2 i32.load offset=4 - local.tee $2 - local.get $5 - i32.load local.tee $3 + local.get $2 + i32.load + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $2 local.get $5 - local.get $3 i32.store offset=4 - local.get $5 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 i32.const 256 i32.lt_s if - local.get $2 - local.set $3 + local.get $3 + local.set $5 local.get $1 - local.set $4 + local.set $7 loop $for-loop|0 - local.get $6 - local.get $3 + local.get $4 + local.get $5 i32.lt_s if - local.get $5 - local.get $6 + local.get $2 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $6 + local.set $6 + local.get $4 i32.const 1 i32.sub local.set $1 @@ -4912,26 +4654,26 @@ i32.const 0 i32.ge_s if - local.get $7 - local.get $5 + local.get $6 + local.get $2 local.get $1 i32.const 2 i32.shl i32.add i32.load local.tee $8 - local.get $4 + local.get $7 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if local.get $1 - local.tee $2 + local.tee $3 i32.const 1 i32.sub local.set $1 - local.get $5 local.get $2 + local.get $3 i32.const 1 i32.add i32.const 2 @@ -4943,25 +4685,25 @@ end end end - local.get $5 + local.get $2 local.get $1 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $7 - i32.store local.get $6 + i32.store + local.get $4 i32.const 1 i32.add - local.set $6 + local.set $4 br $for-loop|0 end end else - local.get $5 local.get $2 + local.get $3 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -5084,29 +4826,28 @@ (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 $2 - local.set $3 - i32.const 1 - local.set $0 - local.get $2 + local.tee $3 + local.tee $0 i32.load offset=12 local.set $4 loop $for-loop|0 - local.get $0 + local.get $2 local.get $4 i32.lt_s if i32.const 0 - local.get $3 local.get $0 + local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get - local.get $3 local.get $0 + local.get $2 call $~lib/array/Array#__get local.get $1 call_indirect (type $i32_i32_=>_i32) @@ -5114,10 +4855,10 @@ i32.gt_s br_if $__inlined_func$std/array/isSorted drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end @@ -5132,7 +4873,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) (func $start:std/array~anonymous|44 (param $0 i32) (param $1 i32) (result i32) @@ -5189,6 +4930,89 @@ call $~lib/rt/pure/__release end ) + (func $std/array/createReverseOrderedNestedArray (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + i32.const 0 + i32.const 8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + 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 $0 + local.set $1 + local.get $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 8 + i32.store offset=8 + local.get $2 + i32.const 2 + i32.store offset=12 + loop $for-loop|0 + local.get $3 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + local.get $3 + i32.sub + call $~lib/array/Array#__set + local.get $2 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 @@ -5208,7 +5032,7 @@ (local $8 i32) local.get $0 i32.load offset=12 - local.tee $6 + local.tee $5 i32.const 1 i32.le_s if @@ -5219,7 +5043,7 @@ local.get $0 i32.load offset=4 local.set $2 - local.get $6 + local.get $5 i32.const 2 i32.eq if @@ -5228,14 +5052,14 @@ local.tee $3 local.get $2 i32.load - local.tee $6 + local.tee $5 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if local.get $2 - local.get $6 + local.get $5 i32.store offset=4 local.get $2 local.get $3 @@ -5248,20 +5072,20 @@ local.get $2 local.set $3 local.get $1 - local.set $4 + local.set $7 loop $for-loop|0 + local.get $4 local.get $5 - local.get $6 i32.lt_s if local.get $3 - local.get $5 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $5 + local.set $6 + local.get $4 i32.const 1 i32.sub local.set $1 @@ -5270,7 +5094,7 @@ i32.const 0 i32.ge_s if - local.get $7 + local.get $6 local.get $3 local.get $1 i32.const 2 @@ -5278,7 +5102,7 @@ i32.add i32.load local.tee $8 - local.get $4 + local.get $7 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s @@ -5308,12 +5132,12 @@ i32.const 2 i32.shl i32.add - local.get $7 + local.get $6 i32.store - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 + local.set $4 br $for-loop|0 end end @@ -5327,51 +5151,50 @@ (local $5 i32) (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 $2 - local.set $3 - i32.const 1 - local.set $0 - local.get $2 + local.tee $5 + local.tee $0 i32.load offset=12 local.set $6 loop $for-loop|0 - local.get $0 + local.get $2 local.get $6 i32.lt_s if - local.get $3 local.get $0 + local.get $2 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $4 - local.get $3 + local.tee $3 local.get $0 + local.get $2 call $~lib/array/Array#__get - local.tee $5 + local.tee $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/array/Array> end - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $4 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|0 end end @@ -5386,9 +5209,93 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 call $~lib/rt/pure/__release ) + (func $std/array/createReverseOrderedElementsArray (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 2048 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + i32.const 0 + i32.const 2048 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 14 + 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 $0 + local.set $1 + local.get $0 + local.get $2 + i32.load + local.tee $4 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + i32.const 2048 + i32.store offset=8 + local.get $2 + i32.const 512 + i32.store offset=12 + loop $for-loop|0 + local.get $3 + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $3 + i32.sub + i32.store + local.get $2 + local.get $3 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load @@ -7492,10 +7399,10 @@ if local.get $3 local.tee $2 + local.get $0 local.get $5 i32.const 2 i32.shl - local.get $0 i32.add i32.load local.tee $3 @@ -7513,11 +7420,11 @@ call $~lib/rt/pure/__retain local.tee $2 local.get $1 - local.get $1 local.get $2 call $~lib/string/String.__concat local.tee $9 local.tee $2 + local.get $1 i32.ne if local.get $2 @@ -7536,11 +7443,11 @@ if local.get $1 local.tee $2 - local.get $2 local.get $4 call $~lib/string/String.__concat local.tee $7 local.tee $1 + local.get $2 i32.ne if local.get $1 @@ -7559,10 +7466,10 @@ br $for-loop|0 end end + local.get $0 local.get $6 i32.const 2 i32.shl - local.get $0 i32.add i32.load local.tee $2 @@ -7581,11 +7488,11 @@ call $~lib/rt/pure/__retain local.tee $0 local.get $1 - local.get $1 local.get $0 call $~lib/string/String.__concat local.tee $0 local.tee $3 + local.get $1 i32.ne if local.get $3 @@ -8693,7 +8600,6 @@ br $for-loop|0 end end - local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8701,6 +8607,7 @@ i32.add i32.load local.tee $2 + local.get $3 i32.ne if local.get $2 @@ -9167,7 +9074,6 @@ br $for-loop|0 end end - local.get $3 local.get $0 local.get $5 i32.const 2 @@ -9175,6 +9081,7 @@ i32.add i32.load local.tee $2 + local.get $3 i32.ne if local.get $2 @@ -9625,21 +9532,21 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f32) (local $12 i32) (local $13 i32) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) + (local $17 f64) (local $18 i32) - (local $19 f32) + (local $19 i32) (local $20 i32) (local $21 i32) (local $22 i32) (local $23 i32) (local $24 i32) - (local $25 f64) + (local $25 i32) (local $26 i32) (local $27 i32) (local $28 i32) @@ -9648,8 +9555,8 @@ (local $31 i32) (local $32 i32) (local $33 i32) - (local $34 i32) - (local $35 i32) + (local $34 f32) + (local $35 f64) (local $36 i32) (local $37 i32) (local $38 i32) @@ -9674,6 +9581,8 @@ (local $57 i32) (local $58 i32) (local $59 i32) + (local $60 i32) + (local $61 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -9683,52 +9592,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $2 + local.get $1 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 + local.set $1 end - local.get $2 + local.get $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 $1 - local.tee $0 local.get $2 + local.tee $0 + local.get $1 i32.load - local.tee $6 + local.tee $3 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $6 + local.get $3 call $~lib/rt/pure/__release end - local.get $2 + local.get $1 local.get $0 i32.store - local.get $2 local.get $1 - i32.store offset=4 local.get $2 + i32.store offset=4 + local.get $1 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -9742,7 +9651,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9763,7 +9672,7 @@ i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -9787,7 +9696,7 @@ i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -9811,7 +9720,7 @@ i32.const 1600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -9835,7 +9744,7 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -9859,7 +9768,7 @@ i32.const 1664 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 call $std/array/isArraysEqual i32.eqz if @@ -9872,15 +9781,15 @@ 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 $2 + local.get $4 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $10 + local.get $9 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9901,7 +9810,7 @@ i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9926,7 +9835,7 @@ i32.const 1792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9951,7 +9860,7 @@ i32.const 1840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9976,7 +9885,7 @@ i32.const 1888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10001,7 +9910,7 @@ i32.const 1936 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10015,15 +9924,15 @@ 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 $2 + local.get $4 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $10 + local.get $9 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10286,37 +10195,37 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $2 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 local.get $0 i32.load offset=12 - local.tee $1 + local.tee $2 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 - local.tee $2 - local.get $1 + local.tee $1 + local.get $2 i32.const 2 i32.shl i32.add - local.set $1 + local.set $2 loop $do-continue|0 - local.get $2 + local.get $1 i32.load call $~lib/rt/pure/__release - local.get $2 + local.get $1 i32.const 4 i32.add - local.tee $2 - local.get $1 + local.tee $1 + local.get $2 i32.lt_u br_if $do-continue|0 end @@ -10342,11 +10251,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $1 + local.set $2 global.get $std/array/arr - local.get $1 + local.get $2 call $~lib/array/Array#concat - local.set $2 + local.set $1 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10371,7 +10280,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -10383,14 +10292,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 2032 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $3 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10405,7 +10314,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10418,7 +10327,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10431,7 +10340,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10444,17 +10353,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 46 call $~lib/array/Array#push - local.get $1 + local.get $2 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $1 + local.get $2 call $~lib/array/Array#concat local.set $0 - local.get $2 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10468,7 +10377,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=12 i32.const 2 i32.ne @@ -10578,7 +10487,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -10588,13 +10497,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 global.get $std/array/arr call $~lib/array/Array#concat - local.set $3 + local.set $4 local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.load offset=12 i32.const 3 i32.ne @@ -10606,7 +10515,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 if i32.const 0 @@ -10616,13 +10525,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10630,19 +10539,19 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10660,22 +10569,22 @@ i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $6 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10693,21 +10602,22 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.get $2 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10725,21 +10635,21 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $25 i32.const 5 i32.const 2 i32.const 3 i32.const 2400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10757,21 +10667,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 0 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 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10789,21 +10699,21 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $30 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10821,21 +10731,21 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $30 i32.const 5 i32.const 2 i32.const 3 i32.const 2688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10853,21 +10763,21 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.tee $1 + local.tee $2 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $17 + local.tee $19 i32.const 5 i32.const 2 i32.const 3 i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10885,10 +10795,9 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.tee $2 i32.const 0 i32.const -2 i32.const -1 @@ -10900,7 +10809,7 @@ i32.const 2880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10918,22 +10827,22 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $21 + local.tee $22 i32.const 5 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10951,15 +10860,15 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $2 local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $23 + local.tee $24 i32.const 5 i32.const 2 i32.const 3 @@ -10984,15 +10893,15 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 @@ -11011,53 +10920,53 @@ 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 $4 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $24 + local.get $9 call $~lib/rt/pure/__release - local.get $8 + local.get $15 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $9 + local.get $25 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release - local.get $30 + local.get $10 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 + local.get $30 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $14 + local.get $19 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release + local.get $14 + 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 $26 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release @@ -11233,9 +11142,9 @@ unreachable end global.get $std/array/arr - local.tee $1 - i32.load offset=12 local.tee $2 + i32.load offset=12 + local.tee $1 i32.const 1 i32.lt_s if @@ -11246,7 +11155,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=4 local.tee $0 i32.load @@ -11254,21 +11163,21 @@ local.get $0 i32.const 4 i32.add - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 2 i32.shl - local.tee $6 + local.tee $3 call $~lib/memory/memory.copy local.get $0 - local.get $6 + local.get $3 i32.add i32.const 0 i32.store - local.get $1 local.get $2 + local.get $1 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11436,14 +11345,14 @@ unreachable end global.get $std/array/arr - local.tee $0 + local.tee $2 i32.load offset=12 local.tee $1 if - local.get $0 + local.get $2 i32.load offset=4 - local.set $2 - local.get $0 + local.set $0 + local.get $2 i32.load offset=4 local.get $1 i32.const 1 @@ -11453,24 +11362,24 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 + local.get $0 local.get $1 i32.lt_u if - local.get $2 + local.get $0 i32.load - local.set $0 - local.get $2 + local.set $2 + local.get $0 local.get $1 i32.load i32.store local.get $1 - local.get $0 - i32.store local.get $2 + i32.store + local.get $0 i32.const 4 i32.add - local.set $2 + local.set $0 local.get $1 i32.const 4 i32.sub @@ -11706,18 +11615,18 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $2 i32.const 1 i32.const 2 i32.const 9 i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $6 + local.tee $2 + local.set $3 + i32.const 0 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.load offset=12 local.tee $1 if (result i32) @@ -11729,19 +11638,19 @@ end if i32.const -1 - local.set $2 + local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $6 + local.get $3 i32.load offset=4 - local.set $3 + local.set $4 loop $while-continue|022 - local.get $2 + local.get $0 local.get $1 i32.lt_s if - local.get $3 - local.get $2 + local.get $4 + local.get $0 i32.const 2 i32.shl i32.add @@ -11749,17 +11658,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 @@ -11770,8 +11679,6 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $2 i32.const 1 i32.const 3 i32.const 10 @@ -11779,33 +11686,35 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $1 - local.set $10 + local.set $9 + i32.const 0 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf local.get $1 i32.load offset=12 - local.tee $3 + local.tee $4 if (result i32) i32.const 0 - local.get $3 + local.get $4 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 $10 + local.get $9 i32.load offset=4 - local.set $6 + local.set $3 loop $while-continue|023 - local.get $2 - local.get $3 + local.get $0 + local.get $4 i32.lt_s if - local.get $6 - local.get $2 + local.get $3 + local.get $0 i32.const 3 i32.shl i32.add @@ -11813,17 +11722,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 @@ -11834,7 +11743,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -11976,7 +11885,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 2 @@ -11984,50 +11893,50 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $4 i32.load offset=12 - local.tee $3 + local.tee $1 if (result i32) i32.const 0 - local.get $3 + local.get $1 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $4 i32.load offset=4 - local.set $10 - loop $while-continue|00 - local.get $2 - local.get $3 + local.set $9 + loop $while-continue|024 + local.get $0 + local.get $1 i32.lt_s if i32.const 1 - local.get $10 - local.get $2 + local.get $9 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $19 + local.tee $11 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $19 - local.get $19 + local.get $11 + local.get $11 f32.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 - br $while-continue|00 + local.set $0 + br $while-continue|024 end end i32.const 0 @@ -12043,7 +11952,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $2 + local.set $1 i32.const 0 i32.const 1 i32.const 3 @@ -12051,50 +11960,50 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 - local.tee $6 + local.tee $3 if (result i32) i32.const 0 - local.get $6 + local.get $3 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $2 i32.load offset=4 - local.set $5 - loop $while-continue|01 - local.get $2 - local.get $6 + local.set $15 + loop $while-continue|025 + local.get $1 + local.get $3 i32.lt_s if i32.const 1 - local.get $5 - local.get $2 + local.get $15 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $25 + local.tee $17 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $25 - local.get $25 + local.get $17 + local.get $17 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 - br $while-continue|01 + local.set $1 + br $while-continue|025 end end i32.const 0 @@ -12163,9 +12072,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12173,18 +12082,18 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $3 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12196,14 +12105,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 2 i32.const 3 i32.const 3440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12222,20 +12131,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $0 - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $0 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $7 + local.tee $6 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 $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12254,7 +12163,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12272,10 +12181,10 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice @@ -12286,7 +12195,7 @@ i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12298,14 +12207,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const 2 i32.const 3 i32.const 3648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12323,21 +12232,21 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 + local.set $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $17 + local.tee $19 i32.const 2 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12349,7 +12258,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -12374,21 +12283,21 @@ i32.const 3792 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 0 i32.const 1 call $~lib/array/Array#splice - local.tee $20 + local.tee $21 i32.const 1 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12400,14 +12309,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12425,14 +12334,13 @@ i32.const 3904 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 -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $23 + local.tee $24 i32.const 1 i32.const 2 i32.const 3 @@ -12558,7 +12466,7 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12582,14 +12490,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $35 + local.tee $37 i32.const 1 i32.const 2 i32.const 3 i32.const 4288 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12608,7 +12516,7 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12632,14 +12540,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $38 + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 4400 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12658,7 +12566,7 @@ i32.const 4416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12682,14 +12590,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $41 + local.tee $43 i32.const 0 i32.const 2 i32.const 3 i32.const 4512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12708,7 +12616,7 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12726,20 +12634,21 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $44 + local.tee $46 i32.const 0 i32.const 2 i32.const 3 i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12751,14 +12660,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 2 i32.const 3 i32.const 4640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12776,21 +12685,21 @@ i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $47 + local.tee $49 i32.const 0 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12802,14 +12711,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12828,20 +12737,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $2 - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $50 + local.tee $52 i32.const 0 i32.const 2 i32.const 3 i32.const 4848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12860,7 +12769,7 @@ i32.const 4864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12881,7 +12790,7 @@ local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $10 + local.tee $15 i32.load offset=12 if i32.const 0 @@ -12907,7 +12816,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $9 i32.load offset=4 local.tee $0 i32.const 1 @@ -12931,13 +12840,13 @@ i32.store offset=16 local.get $1 call $~lib/rt/pure/__release - local.get $6 + local.get $9 i32.const 2 call $~lib/array/Array#splice - local.set $24 - local.get $10 + local.set $25 + local.get $15 call $~lib/rt/pure/__release - local.get $24 + local.get $25 i32.load offset=12 i32.const 2 i32.ne @@ -12949,10 +12858,10 @@ call $~lib/builtins/abort unreachable end - local.get $24 + local.get $25 i32.const 0 call $~lib/array/Array#__get - local.tee $53 + local.tee $55 i32.load i32.const 3 i32.ne @@ -12964,10 +12873,10 @@ call $~lib/builtins/abort unreachable end - local.get $24 + local.get $25 i32.const 1 call $~lib/array/Array#__get - local.tee $54 + local.tee $56 i32.load i32.const 4 i32.ne @@ -12979,7 +12888,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $9 i32.load offset=12 i32.const 3 i32.ne @@ -12991,10 +12900,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $9 i32.const 0 call $~lib/array/Array#__get - local.tee $55 + local.tee $57 i32.load i32.const 1 i32.ne @@ -13006,10 +12915,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $9 i32.const 1 call $~lib/array/Array#__get - local.tee $56 + local.tee $58 i32.load i32.const 2 i32.ne @@ -13021,10 +12930,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $9 i32.const 2 call $~lib/array/Array#__get - local.tee $57 + local.tee $59 i32.load i32.const 5 i32.ne @@ -13042,7 +12951,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $15 i32.load offset=4 local.tee $0 i32.const 1 @@ -13055,7 +12964,7 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $10 + local.get $15 call $~lib/array/Array#splice local.tee $30 i32.load offset=12 @@ -13094,7 +13003,7 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $15 i32.load offset=12 i32.const 2 i32.ne @@ -13106,10 +13015,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $15 i32.const 0 call $~lib/array/Array#__get - local.tee $58 + local.tee $60 if i32.const 0 i32.const 1296 @@ -13118,7 +13027,7 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $15 i32.const 1 call $~lib/array/Array#__get local.tee $1 @@ -13145,38 +13054,38 @@ end local.get $2 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $8 + local.get $3 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $9 + local.get $6 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release - local.get $13 + local.get $10 call $~lib/rt/pure/__release - local.get $15 + local.get $13 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 $14 + local.get $19 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release + local.get $14 + 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 $26 call $~lib/rt/pure/__release local.get $27 @@ -13191,10 +13100,6 @@ call $~lib/rt/pure/__release local.get $29 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 @@ -13239,9 +13144,13 @@ 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 $0 call $~lib/rt/pure/__release - local.get $58 + local.get $60 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -13717,17 +13626,17 @@ unreachable end loop $for-loop|0 - local.get $4 + local.get $5 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end @@ -13744,11 +13653,11 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $2 + local.set $1 global.get $std/array/arr - local.tee $1 + local.tee $2 i32.load offset=12 - local.tee $4 + local.tee $5 i32.const 2 i32.const 9 i32.const 0 @@ -13756,39 +13665,39 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.set $3 - loop $for-loop|041 - local.get $2 - local.get $4 + local.set $4 + loop $for-loop|043 local.get $1 + local.get $5 + local.get $2 i32.load offset=12 - local.tee $5 - local.get $4 + local.tee $3 local.get $5 + local.get $3 i32.lt_s select i32.lt_s if - local.get $2 + local.get $1 i32.const 2 i32.shl - local.tee $5 - local.get $1 + local.tee $3 + local.get $2 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $19 + local.set $11 local.get $3 - local.get $5 + local.get $4 i32.add - local.get $19 + local.get $11 f32.store - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 - br $for-loop|041 + local.set $1 + br $for-loop|043 end end local.get $0 @@ -14331,14 +14240,132 @@ call $~lib/bindings/Math/random i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $~lib/array/Array#sort + block $__inlined_func$~lib/array/Array#sort (result i32) + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 5280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=12 + local.tee $3 + i32.const 1 + i32.le_s + if + local.get $4 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $4 + i32.load offset=4 + local.set $1 + local.get $3 + i32.const 2 + i32.eq + if + local.get $1 + f32.load offset=4 + local.tee $11 + local.get $1 + f32.load + local.tee $34 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $34 + f32.store offset=4 + local.get $1 + local.get $11 + f32.store + end + local.get $4 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $3 + i32.const 256 + i32.lt_s + if + i32.const 0 + local.set $5 + loop $for-loop|00 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $11 + local.get $5 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|1 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $11 + local.get $1 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $34 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $34 + f32.store + br $while-continue|1 + end + end + end + local.get $1 + local.get $0 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $11 + f32.store + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end + else + local.get $1 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + local.get $4 + call $~lib/rt/pure/__retain + end call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14347,51 +14374,50 @@ i32.const 5328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 - local.set $0 + local.set $7 i32.const 0 local.set $1 block $folding-inner0 - local.get $2 + local.get $4 i32.load offset=12 - local.tee $3 - local.get $0 + local.tee $2 + local.get $7 i32.load offset=12 i32.ne br_if $folding-inner0 i32.const 1 - local.get $0 - local.get $2 + local.get $4 + local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|00 + loop $for-loop|001 local.get $1 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $4 local.get $1 call $~lib/array/Array#__get - local.tee $19 - local.get $19 + local.tee $11 + local.get $11 f32.ne if (result i32) - local.get $0 + local.get $7 local.get $1 call $~lib/array/Array#__get - local.tee $19 - local.get $19 + local.tee $11 + local.get $11 f32.ne else i32.const 0 end i32.eqz if - local.get $2 + local.get $4 local.get $1 call $~lib/array/Array#__get - local.get $0 + local.get $7 local.get $1 call $~lib/array/Array#__get f32.ne @@ -14401,7 +14427,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|00 + br $for-loop|001 end end i32.const 1 @@ -14418,77 +14444,194 @@ call $~lib/builtins/abort unreachable end - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 5376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#sort - call $~lib/rt/pure/__release - block $__inlined_func$std/array/isArraysEqual (result i32) + block $__inlined_func$~lib/array/Array#sort (result i32) i32.const 8 i32.const 3 i32.const 10 - i32.const 5456 + i32.const 5376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 - local.set $0 - i32.const 0 - local.set $4 - block $folding-inner01 + local.tee $3 + i32.load offset=12 + local.tee $6 + i32.const 1 + i32.le_s + if + local.get $3 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $3 + i32.load offset=4 + local.set $1 + local.get $6 + i32.const 2 + i32.eq + if local.get $1 - i32.load offset=12 - local.tee $5 - local.get $0 + f64.load offset=8 + local.tee $17 + local.get $1 + f64.load + local.tee $35 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $35 + f64.store offset=8 + local.get $1 + local.get $17 + f64.store + end + local.get $3 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $6 + i32.const 256 + i32.lt_s + if + i32.const 0 + local.set $5 + loop $for-loop|02 + local.get $5 + local.get $6 + i32.lt_s + if + local.get $1 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $17 + local.get $5 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|13 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $17 + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $35 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $35 + f64.store + br $while-continue|13 + end + end + end + local.get $1 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $17 + f64.store + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|02 + end + end + else + local.get $1 + local.get $6 + call $~lib/util/sort/weakHeapSort + end + local.get $3 + call $~lib/rt/pure/__retain + end + call $~lib/rt/pure/__release + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 5456 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + block $folding-inner01 + local.get $3 + i32.load offset=12 + local.tee $5 + local.get $2 i32.load offset=12 i32.ne br_if $folding-inner01 i32.const 1 - local.get $0 - local.get $1 + local.get $2 + local.get $3 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop - loop $for-loop|02 - local.get $4 + loop $for-loop|025 + local.get $1 local.get $5 i32.lt_s if + local.get $3 local.get $1 - local.get $4 call $~lib/array/Array#__get - local.tee $25 - local.get $25 + local.tee $17 + local.get $17 f64.ne if (result i32) - local.get $0 - local.get $4 + local.get $2 + local.get $1 call $~lib/array/Array#__get - local.tee $25 - local.get $25 + local.tee $17 + local.get $17 f64.ne else i32.const 0 end i32.eqz if + local.get $3 local.get $1 - local.get $4 call $~lib/array/Array#__get - local.get $0 - local.get $4 + local.get $2 + local.get $1 call $~lib/array/Array#__get f64.ne br_if $folding-inner01 end - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 - br $for-loop|02 + local.set $1 + br $for-loop|025 end end i32.const 1 @@ -14511,18 +14654,18 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $18 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $13 + local.get $18 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14540,18 +14683,18 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $19 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $15 + local.get $19 i32.const 5 i32.const 2 i32.const 7 i32.const 5680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14569,28 +14712,28 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $16 + local.set $20 i32.const 1 i32.const 2 i32.const 3 i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $5 i32.const 2 i32.const 2 i32.const 3 i32.const 5776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $1 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $6 i32.const 4 i32.const 2 i32.const 3 @@ -14603,30 +14746,30 @@ local.set $8 i32.const 128 call $std/array/createReverseOrderedArray - local.set $7 + local.set $10 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $9 + local.set $13 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $11 + local.set $16 i32.const 512 call $std/array/createRandomOrderedArray - local.set $17 - local.get $16 + local.set $14 + local.get $20 i32.const 48 call $std/array/assertSorted - local.get $4 + local.get $5 i32.const 48 call $std/array/assertSorted - local.get $4 + local.get $5 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14638,17 +14781,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 48 call $std/array/assertSorted - local.get $3 + local.get $1 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14660,10 +14803,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.const 48 call $std/array/assertSorted - local.get $5 + local.get $6 local.get $0 i32.const 0 call $std/array/isArraysEqual @@ -14692,10 +14835,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $7 + local.get $10 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14708,10 +14851,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 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14724,10 +14867,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $11 + local.get $16 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -14740,233 +14883,82 @@ call $~lib/builtins/abort unreachable end - local.get $17 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $2 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - local.get $14 + local.get $7 call $~lib/rt/pure/__release - local.get $13 + local.get $3 call $~lib/rt/pure/__release - local.get $20 + local.get $2 call $~lib/rt/pure/__release - local.get $15 + local.get $18 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release - local.get $16 + local.get $19 call $~lib/rt/pure/__release - local.get $4 + local.get $22 call $~lib/rt/pure/__release - local.get $3 + local.get $20 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $9 + local.get $10 call $~lib/rt/pure/__release - local.get $11 + local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $16 call $~lib/rt/pure/__release - local.get $22 + local.get $14 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $1 + local.set $2 local.get $0 i32.const 49 call $std/array/assertSorted local.get $0 i32.const 50 call $std/array/assertSorted - local.get $1 + local.get $2 i32.const 51 call $std/array/assertSorted - local.get $1 + local.get $2 i32.const 52 call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - local.set $1 - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $4 - i32.const 0 - i32.const 8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - 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 $4 + call $~lib/rt/pure/__release + call $std/array/createReverseOrderedNestedArray local.tee $0 - local.get $2 - i32.load - local.tee $3 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $0 - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.store offset=8 - local.get $2 - i32.const 2 - i32.store offset=12 - loop $for-loop|059 - local.get $1 - 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 $1 - i32.sub - call $~lib/array/Array#__set - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|059 - end - end - local.get $2 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 $1 - i32.const 2048 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $4 - i32.const 0 - i32.const 2048 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 14 - 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 $4 + call $std/array/createReverseOrderedElementsArray local.tee $0 - local.get $2 - i32.load - local.tee $3 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $2 - local.get $0 - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - i32.const 2048 - i32.store offset=8 - local.get $2 - i32.const 512 - i32.store offset=12 - loop $for-loop|060 - local.get $1 - 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 $1 - i32.sub - i32.store - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|060 - end - end - local.get $2 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 @@ -14974,59 +14966,59 @@ i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $3 i32.const 7 i32.const 2 i32.const 15 i32.const 6128 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $7 block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - local.set $4 - local.get $5 + local.set $1 + local.get $3 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 - local.set $1 + local.set $2 local.get $0 i32.load offset=12 - local.set $7 + local.set $6 loop $for-loop|03 - local.get $4 - local.get $7 + local.get $1 + local.get $6 i32.lt_s if + local.get $2 local.get $1 - local.get $4 i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $2 + local.tee $5 + local.get $2 local.get $1 - local.get $4 call $~lib/array/Array#__get - local.tee $3 + local.tee $4 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s if - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String | null> end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 + local.get $5 call $~lib/rt/pure/__release local.get $4 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|03 end end @@ -15045,53 +15037,53 @@ call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $4 + local.set $1 i32.const 0 - local.get $5 + local.get $3 i32.load offset=12 - local.tee $2 - local.get $8 + local.tee $5 + local.get $7 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $5 - local.get $8 + local.get $3 + local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 - local.get $4 - local.get $2 + local.get $1 + local.get $5 i32.lt_s if - local.get $5 - local.get $4 + local.get $3 + local.get $1 call $~lib/array/Array#__get local.tee $0 - local.get $8 - local.get $4 + local.get $7 + local.get $1 call $~lib/array/Array#__get - local.tee $1 + local.tee $2 call $~lib/string/String.__eq i32.eqz if local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|04 end end @@ -15107,7 +15099,7 @@ unreachable end i32.const 0 - local.set $4 + local.set $5 i32.const 1600 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -15132,16 +15124,17 @@ i32.const 0 i32.store offset=12 local.get $0 - local.tee $1 + local.set $1 + local.get $0 local.get $2 i32.load - local.tee $3 + local.tee $4 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $2 @@ -15157,22 +15150,24 @@ i32.const 400 i32.store offset=12 loop $for-loop|09 - local.get $4 + local.get $5 i32.const 400 i32.lt_s if + local.get $5 + local.set $1 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - local.set $9 + local.set $8 i32.const 0 - local.set $7 + local.set $6 i32.const 6064 local.set $0 loop $for-loop|01 - local.get $7 - local.get $9 + local.get $6 + local.get $8 i32.lt_s if block $__inlined_func$~lib/string/String#charAt (result i32) @@ -15184,7 +15179,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $1 + local.tee $5 i32.const 5088 call $~lib/string/String#get:length i32.ge_u @@ -15193,63 +15188,63 @@ i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $1 + local.tee $4 + local.get $5 i32.const 1 i32.shl i32.const 5088 i32.add i32.load16_u i32.store16 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain end - local.set $1 + local.set $5 local.get $0 - local.tee $3 + local.tee $4 local.get $0 - local.get $1 + local.get $5 call $~lib/string/String.__concat - local.tee $11 + local.tee $10 local.tee $0 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end - local.get $1 + local.get $5 call $~lib/rt/pure/__release - local.get $11 + local.get $10 call $~lib/rt/pure/__release - local.get $7 + local.get $6 i32.const 1 i32.add - local.set $7 + local.set $6 br $for-loop|01 end end local.get $2 - local.get $4 + local.get $1 local.get $0 call $~lib/array/Array<~lib/array/Array>#__set local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|09 end end local.get $2 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $5 + local.get $3 call $~lib/rt/pure/__release - local.get $8 + local.get $7 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -15264,7 +15259,7 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $3 + local.tee $4 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15282,10 +15277,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $3 i32.const 6064 call $~lib/array/Array#join - local.tee $8 + local.tee $7 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15303,10 +15298,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 6512 call $~lib/array/Array#join - local.tee $9 + local.tee $8 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15324,7 +15319,7 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.const 6576 call $~lib/array/Array#join local.tee $13 @@ -15345,12 +15340,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.load offset=4 - local.get $1 + local.get $2 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $15 + local.tee $16 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15368,10 +15363,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $18 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $17 + local.tee $19 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15389,22 +15384,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $4 + local.get $5 call $~lib/array/Array#join - local.tee $18 + local.tee $20 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15422,7 +15417,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=4 local.tee $14 i32.const 0 @@ -15432,7 +15427,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $2 + local.get $1 call $~lib/array/Array#join local.tee $14 i32.const 8176 @@ -15448,33 +15443,33 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $8 + local.get $3 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $9 + local.get $6 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release - local.get $13 + local.get $10 call $~lib/rt/pure/__release - local.get $1 + local.get $13 call $~lib/rt/pure/__release - local.get $15 + local.get $2 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 + local.get $18 + call $~lib/rt/pure/__release + local.get $19 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release - local.get $18 + local.get $20 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -15484,29 +15479,29 @@ i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 1 i32.const 2 i32.const 3 i32.const 8272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $4 i32.const 2 i32.const 2 i32.const 3 i32.const 8304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $3 i32.const 4 i32.const 2 i32.const 3 i32.const 8336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 - local.get $2 + local.set $7 + local.get $1 i32.const 6304 call $~lib/array/Array#join local.tee $0 @@ -15522,11 +15517,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $16 + local.set $18 local.get $0 i32.const 7984 call $~lib/string/String.__eq @@ -15539,11 +15534,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $17 + local.set $19 local.get $0 i32.const 8368 call $~lib/string/String.__eq @@ -15556,11 +15551,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $7 i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $18 + local.set $20 local.get $0 i32.const 8400 call $~lib/string/String.__eq @@ -15579,9 +15574,9 @@ i32.const 8432 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 @@ -15604,13 +15599,13 @@ i32.const 8496 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/joinIntegerArray local.tee $0 - local.set $20 + local.set $21 local.get $0 i32.const 8528 call $~lib/string/String.__eq @@ -15629,13 +15624,13 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.load offset=4 - local.get $11 + local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $21 + local.set $22 local.get $0 i32.const 8624 call $~lib/string/String.__eq @@ -15660,7 +15655,7 @@ i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $22 + local.set $23 local.get $0 i32.const 8736 call $~lib/string/String.__eq @@ -15679,7 +15674,7 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $24 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 @@ -15727,7 +15722,7 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $1 + local.tee $2 i32.const 2 i32.const 2 i32.const 3 @@ -15735,7 +15730,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 i32.const 2 i32.const 2 i32.const 3 @@ -15748,9 +15743,9 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $1 + local.tee $2 local.set $32 - local.get $1 + local.get $2 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15768,9 +15763,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.load offset=4 - local.tee $4 + local.tee $5 i32.const 2 i32.const 0 i32.const 6 @@ -15778,7 +15773,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $5 i32.const 2 i32.const 0 i32.const 6 @@ -15786,14 +15781,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $2 i32.load offset=4 - local.get $1 + local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $4 + local.tee $5 local.set $33 - local.get $4 + local.get $5 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15811,7 +15806,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.load offset=4 i32.const 1 i32.const 2 @@ -15830,9 +15825,9 @@ i32.store local.get $29 i32.store - local.get $4 + local.get $5 i32.load offset=4 - local.get $4 + local.get $5 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $28 @@ -15849,39 +15844,39 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release - local.get $8 + local.get $4 call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release - local.get $16 + local.get $7 call $~lib/rt/pure/__release - local.get $17 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $7 + local.get $19 call $~lib/rt/pure/__release - local.get $14 + local.get $20 call $~lib/rt/pure/__release - local.get $9 + local.get $6 call $~lib/rt/pure/__release - local.get $20 + local.get $14 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release - local.get $13 + local.get $10 call $~lib/rt/pure/__release local.get $22 call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release local.get $26 call $~lib/rt/pure/__release local.get $27 @@ -15902,9 +15897,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $3 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -15912,7 +15907,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15920,7 +15915,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15928,7 +15923,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -15936,9 +15931,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $5 + local.get $3 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $8 + local.tee $7 i32.load offset=12 i32.const 10 i32.ne @@ -15955,7 +15950,7 @@ i32.const 10 i32.lt_s if - local.get $8 + local.get $7 local.get $12 call $~lib/array/Array#__get local.get $12 @@ -15981,9 +15976,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 15 @@ -15991,7 +15986,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -15999,7 +15994,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 15 @@ -16007,7 +16002,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 1 i32.const 2 i32.const 15 @@ -16015,17 +16010,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $7 + local.get $6 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $2 + local.set $1 i32.const 8 i32.const 2 i32.const 15 i32.const 9744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 - local.get $2 + local.set $4 + local.get $1 i32.load offset=12 i32.const 8 i32.ne @@ -16041,18 +16036,18 @@ local.set $12 loop $for-loop|2 local.get $12 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $2 + local.get $1 local.get $12 call $~lib/array/Array#__get - local.tee $9 - local.get $3 + local.tee $8 + local.get $4 local.get $12 call $~lib/array/Array#__get - local.tee $11 + local.tee $10 call $~lib/string/String.__eq i32.eqz if @@ -16063,9 +16058,9 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $8 call $~lib/rt/pure/__release - local.get $11 + local.get $10 call $~lib/rt/pure/__release local.get $12 i32.const 1 @@ -16082,7 +16077,7 @@ call $~lib/rt/pure/__retain local.tee $12 i32.load offset=4 - local.tee $9 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 @@ -16090,7 +16085,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $9 + local.get $8 i32.const 0 i32.const 2 i32.const 3 @@ -16100,7 +16095,7 @@ i32.store offset=4 local.get $12 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $9 + local.tee $8 i32.load offset=12 if i32.const 0 @@ -16112,31 +16107,31 @@ end local.get $12 call $~lib/rt/pure/__release - local.get $9 + local.get $8 call $~lib/rt/pure/__release - local.get $6 + local.get $9 call $~lib/rt/pure/__release - local.get $24 + local.get $25 call $~lib/rt/pure/__release - local.get $10 + local.get $15 call $~lib/rt/pure/__release local.get $30 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $8 + local.get $3 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 call $~lib/rt/pure/__release ) (func $~start diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 70f36c4bbd..e7ad203e1f 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -903,15 +903,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -919,14 +919,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -935,18 +935,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -957,18 +957,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -977,7 +977,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -985,9 +985,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -999,11 +999,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1013,25 +1013,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1702,10 +1702,9 @@ i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1723,10 +1722,10 @@ 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 @@ -1744,10 +1743,10 @@ i32.const -4 i32.const 42 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 @@ -1766,7 +1765,7 @@ i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.set $7 - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $7 i32.const 16 @@ -1835,13 +1834,14 @@ local.tee $1 i32.const 16 i32.sub - local.tee $0 i32.load offset=12 local.tee $5 i32.const 1073741808 i32.gt_u local.get $5 - local.get $0 + local.get $1 + i32.const 16 + i32.sub i32.load offset=12 i32.gt_u i32.or diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index b0702c7965..f112291106 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -911,15 +911,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -927,14 +927,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -943,18 +943,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -965,18 +965,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -985,7 +985,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -993,9 +993,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1007,11 +1007,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1021,25 +1021,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -3384,14 +3384,14 @@ end local.get $1 i32.load - local.tee $2 + local.tee $3 i32.const 16 i32.sub i32.load offset=12 - local.set $3 - local.get $2 - i32.const 0 + local.set $2 local.get $3 + i32.const 0 + local.get $2 call $~lib/dataview/DataView#constructor local.set $2 local.get $0 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 54a79cc5fb..93499c11aa 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -856,12 +856,13 @@ (local $1 f64) (local $2 i64) local.get $0 + local.tee $1 i64.reinterpret_f64 local.tee $2 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $1 + local.set $0 local.get $2 i64.const 52 i64.shr_u @@ -870,42 +871,44 @@ local.tee $2 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 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 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 @@ -914,12 +917,12 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $1 f64.copysign ) (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) @@ -1153,9 +1156,10 @@ (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 @@ -1164,42 +1168,43 @@ 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/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64) @@ -5802,51 +5807,54 @@ (local $1 f32) (local $2 i32) local.get $0 + local.tee $1 i32.reinterpret_f32 i32.const 2147483647 i32.and local.tee $2 f32.reinterpret_i32 - local.set $1 + local.set $0 local.get $2 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 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 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 @@ -5855,12 +5863,12 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $1 f32.copysign ) (func $~lib/math/NativeMathf.atan (param $0 f32) (result f32) @@ -6066,48 +6074,50 @@ (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/math/NativeMathf.atan2 (param $0 f32) (param $1 f32) (result f32) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 59ea89c529..cf89502f7c 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))) @@ -930,9 +930,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -940,14 +940,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -956,18 +956,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -979,9 +979,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -998,7 +998,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1006,9 +1006,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1020,11 +1020,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1034,25 +1034,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1971,7 +1971,6 @@ i32.load local.set $3 call $~lib/rt/tlsf/maybeInitialize - local.set $6 local.get $3 i32.const 16 i32.sub @@ -2010,35 +2009,34 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $6 local.get $4 local.get $1 local.get $2 i32.shl - local.tee $1 + local.tee $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $1 + local.get $5 i32.add - local.get $1 + local.get $2 local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $2 + local.get $1 local.get $3 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 $1 + local.get $2 i32.store offset=8 end ) @@ -2090,6 +2088,118 @@ local.get $1 i32.store offset=12 ) + (func $~lib/map/Map#keys (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 $5 + local.get $0 + i32.load offset=16 + local.tee $4 + local.tee $8 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 4 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $8 + i32.store offset=8 + local.get $0 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $4 + i32.lt_s + if + local.get $5 + local.get $6 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $7 + local.get $2 + i32.load8_s + call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $0 + local.get $7 + call $~lib/array/Array#set:length + local.get $0 + ) (func $~lib/array/Array#constructor (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -2493,9 +2603,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -2569,7 +2679,6 @@ end local.get $0 i32.load offset=8 - local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -2580,7 +2689,6 @@ local.get $5 i32.const 3 i32.shl - local.get $1 i32.add local.tee $1 local.get $3 @@ -2597,9 +2705,9 @@ local.get $1 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -2983,32 +3091,29 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) i32.const 24 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -3019,7 +3124,7 @@ i32.const 100 i32.lt_s if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has if @@ -3030,7 +3135,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 24 @@ -3041,7 +3146,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3053,7 +3158,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3079,7 +3184,7 @@ br $for-loop|1 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3102,7 +3207,7 @@ i32.const 100 i32.lt_s if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3114,7 +3219,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3133,7 +3238,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 24 @@ -3144,7 +3249,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -3156,7 +3261,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -3182,7 +3287,7 @@ br $for-loop|3 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3194,120 +3299,20 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - local.get $3 - i32.load offset=8 - local.set $8 - local.get $3 - i32.load offset=16 - local.tee $9 - local.tee $6 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $6 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 4 + local.get $0 + call $~lib/map/Map#keys + local.set $4 + local.get $0 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $5 + local.tee $1 i32.const 0 i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.tee $2 - local.get $5 - i32.load - local.tee $10 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $10 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $2 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $6 - i32.store offset=8 - local.get $5 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $9 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 - local.get $2 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - local.get $5 - local.get $1 - call $~lib/array/Array#set:length - local.get $3 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.store - local.get $1 + local.get $1 i32.const 0 i32.store offset=4 local.get $1 @@ -3325,15 +3330,15 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $0 + local.set $5 loop $for-loop|4 + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.lt_s if + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.ge_u if @@ -3344,18 +3349,18 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $4 - local.get $5 i32.load offset=4 i32.add i32.load8_s - local.set $2 + local.set $3 local.get $6 - local.get $4 + local.get $2 call $~lib/array/Array#__get local.set $7 + local.get $0 local.get $3 - local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3366,7 +3371,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -3381,22 +3386,22 @@ unreachable end local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $5 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 $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|4 end end @@ -3412,7 +3417,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -3425,9 +3430,9 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|6 - local.get $4 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3435,8 +3440,8 @@ i32.const 50 i32.lt_s if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3447,10 +3452,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $4 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3466,11 +3471,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3480,14 +3485,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|6 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3500,9 +3505,9 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|8 - local.get $4 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3510,8 +3515,8 @@ i32.const 50 i32.lt_s if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3521,9 +3526,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 - local.get $4 + local.get $0 + local.get $2 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3532,8 +3537,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3544,11 +3549,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3558,14 +3563,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|8 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3577,9 +3582,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 call $~lib/map/Map#clear - local.get $3 + local.get $0 i32.load offset=20 if i32.const 0 @@ -3589,15 +3594,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) @@ -3859,7 +3864,8 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3867,39 +3873,150 @@ (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 $6 - local.get $4 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 local.get $0 i32.load offset=8 - local.tee $3 + local.set $5 local.get $0 i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $8 - local.get $4 - local.set $5 - loop $while-continue|0 + local.tee $4 + local.tee $8 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 9 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 local.get $3 - local.get $8 - i32.ne + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $8 + i32.store offset=8 + local.get $0 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $6 + local.get $4 + i32.lt_s + if + local.get $5 + local.get $6 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $7 + local.get $2 + i32.load8_u + call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $0 + local.get $7 + call $~lib/array/Array#set:length + local.get $0 + ) + (func $~lib/map/Map#rehash (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 $6 + local.get $4 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $4 + local.get $0 + i32.load offset=8 + local.tee $3 + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $8 + local.get $4 + local.set $5 + loop $while-continue|0 + local.get $3 + local.get $8 + i32.ne if local.get $3 local.tee $2 @@ -4006,9 +4123,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -4082,7 +4199,6 @@ end local.get $0 i32.load offset=8 - local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -4093,7 +4209,6 @@ local.get $5 i32.const 3 i32.shl - local.get $1 i32.add local.tee $1 local.get $3 @@ -4110,9 +4225,9 @@ local.get $1 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -4197,32 +4312,29 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) i32.const 24 i32.const 8 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -4231,7 +4343,7 @@ i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has if @@ -4242,7 +4354,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 255 @@ -4251,7 +4363,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4263,7 +4375,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4287,7 +4399,7 @@ br $for-loop|1 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4308,7 +4420,7 @@ i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4320,7 +4432,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4337,7 +4449,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 255 @@ -4346,7 +4458,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -4358,7 +4470,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -4382,7 +4494,7 @@ br $for-loop|3 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4394,110 +4506,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - local.get $3 - i32.load offset=8 - local.set $8 - local.get $3 - i32.load offset=16 - local.tee $9 - local.tee $6 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $6 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 9 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 local.get $0 - local.tee $2 - local.get $5 - i32.load - local.tee $10 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $10 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $2 - i32.store - local.get $5 + call $~lib/map/Map#keys + local.set $4 local.get $0 - i32.store offset=4 - local.get $5 - local.get $6 - i32.store offset=8 - local.get $5 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $9 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 - local.get $2 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end - local.get $5 - local.get $1 - call $~lib/array/Array#set:length - local.get $3 call $~lib/map/Map#values local.set $6 i32.const 24 @@ -4525,15 +4537,15 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $0 + local.set $5 loop $for-loop|4 + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.lt_s if + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.ge_u if @@ -4544,18 +4556,18 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $4 - local.get $5 i32.load offset=4 i32.add i32.load8_u - local.set $2 + local.set $3 local.get $6 - local.get $4 + local.get $2 call $~lib/array/Array#__get local.set $7 + local.get $0 local.get $3 - local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4566,7 +4578,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -4581,22 +4593,22 @@ unreachable end local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $5 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 $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|4 end end @@ -4612,7 +4624,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -4625,16 +4637,16 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|6 - local.get $4 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4645,10 +4657,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $4 + local.get $2 i32.const 255 i32.and i32.const 20 @@ -4662,11 +4674,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4676,14 +4688,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|6 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4696,16 +4708,16 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|8 - local.get $4 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4715,17 +4727,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 - local.get $4 + 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 $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4736,11 +4748,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4750,14 +4762,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|8 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4769,9 +4781,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 call $~lib/map/Map#clear - local.get $3 + local.get $0 i32.load offset=20 if i32.const 0 @@ -4781,15 +4793,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/util/hash/hash16 (param $0 i32) (result i32) @@ -5165,6 +5177,123 @@ local.get $1 i32.store offset=12 ) + (func $~lib/map/Map#keys (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.tee $7 + local.set $6 + local.get $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $8 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $8 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $9 + local.get $2 + i32.load16_s + call $~lib/array/Array#__set + local.get $9 + i32.const 1 + i32.add + local.set $9 + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $0 + local.get $9 + call $~lib/array/Array#set:length + local.get $0 + ) (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -5314,9 +5443,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -5390,7 +5519,6 @@ end local.get $0 i32.load offset=8 - local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -5401,7 +5529,6 @@ local.get $5 i32.const 3 i32.shl - local.get $1 i32.add local.tee $1 local.get $3 @@ -5418,9 +5545,9 @@ local.get $1 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -5507,33 +5634,29 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) i32.const 24 i32.const 11 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -5544,7 +5667,7 @@ i32.const 100 i32.lt_s if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has if @@ -5555,7 +5678,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 16 @@ -5566,7 +5689,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5578,7 +5701,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5604,7 +5727,7 @@ br $for-loop|1 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5627,7 +5750,7 @@ i32.const 100 i32.lt_s if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5639,7 +5762,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5658,7 +5781,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 16 @@ -5669,7 +5792,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -5681,7 +5804,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -5707,7 +5830,7 @@ br $for-loop|3 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5719,149 +5842,46 @@ call $~lib/builtins/abort unreachable end + local.get $0 + call $~lib/map/Map#keys + local.set $4 + local.get $0 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $3 i32.const 0 - local.set $1 + i32.store local.get $3 - i32.load offset=8 - local.set $9 + i32.const 0 + i32.store offset=4 local.get $3 - i32.load offset=16 - local.tee $10 - local.tee $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 1 - i32.shl - local.tee $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 i32.const 0 i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.tee $2 - local.get $5 - i32.load - local.tee $11 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $2 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $5 - local.get $7 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $10 - i32.lt_s - if - local.get $9 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 - local.get $2 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $5 - local.get $1 - call $~lib/array/Array#set:length local.get $3 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 13 - call $~lib/rt/tlsf/__alloc - 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 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $0 + local.set $5 loop $for-loop|4 + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.lt_s if + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.ge_u if @@ -5872,20 +5892,20 @@ call $~lib/builtins/abort unreachable end - local.get $5 - i32.load offset=4 local.get $4 + i32.load offset=4 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s - local.set $2 + local.set $1 local.get $6 - local.get $4 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $3 - local.get $2 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5896,7 +5916,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -5910,27 +5930,27 @@ call $~lib/builtins/abort unreachable end + local.get $3 + local.get $1 local.get $1 - local.get $2 - local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -5942,7 +5962,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -5955,9 +5975,9 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|6 - local.get $4 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5965,8 +5985,8 @@ i32.const 50 i32.lt_s if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -5977,10 +5997,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $4 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5996,11 +6016,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6010,14 +6030,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|6 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6030,9 +6050,9 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|8 - local.get $4 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -6040,8 +6060,8 @@ i32.const 50 i32.lt_s if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6051,9 +6071,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 - local.get $4 + local.get $0 + local.get $2 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -6062,8 +6082,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -6074,11 +6094,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6088,14 +6108,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|8 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6107,9 +6127,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 call $~lib/map/Map#clear - local.get $3 + local.get $0 i32.load offset=20 if i32.const 0 @@ -6119,15 +6139,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) @@ -6389,7 +6409,8 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6397,41 +6418,157 @@ (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 $6 - local.get $4 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $7 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + (local $9 i32) local.get $0 i32.load offset=8 - local.tee $3 + local.set $4 local.get $0 i32.load offset=16 - i32.const 3 - i32.shl - i32.add - local.set $8 - local.get $4 - local.set $5 - loop $while-continue|0 - local.get $3 - local.get $8 - i32.ne - if - local.get $3 + local.tee $7 + local.set $6 + local.get $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 15 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $8 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $8 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $9 + local.get $2 + i32.load16_u + call $~lib/array/Array#__set + local.get $9 + i32.const 1 + i32.add + local.set $9 + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $0 + local.get $9 + call $~lib/array/Array#set:length + local.get $0 + ) + (func $~lib/map/Map#rehash (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 $6 + local.get $4 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $7 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $4 + local.get $0 + i32.load offset=8 + local.tee $3 + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + i32.add + local.set $8 + local.get $4 + local.set $5 + loop $while-continue|0 + local.get $3 + local.get $8 + i32.ne + if + local.get $3 local.tee $2 i32.load offset=4 i32.const 1 @@ -6536,9 +6673,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -6612,7 +6749,6 @@ end local.get $0 i32.load offset=8 - local.set $1 local.get $0 local.get $0 i32.load offset=16 @@ -6623,7 +6759,6 @@ local.get $5 i32.const 3 i32.shl - local.get $1 i32.add local.tee $1 local.get $3 @@ -6640,9 +6775,9 @@ local.get $1 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -6727,33 +6862,29 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) i32.const 24 i32.const 14 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 local.get $1 @@ -6762,7 +6893,7 @@ i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has if @@ -6773,7 +6904,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 65535 @@ -6782,7 +6913,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -6794,7 +6925,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -6818,7 +6949,7 @@ br $for-loop|1 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -6839,7 +6970,7 @@ i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -6851,7 +6982,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -6868,7 +6999,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 local.get $1 i32.const 65535 @@ -6877,7 +7008,7 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -6889,7 +7020,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -6913,7 +7044,7 @@ br $for-loop|3 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -6925,149 +7056,46 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - local.get $3 - i32.load offset=8 - local.set $9 - local.get $3 - i32.load offset=16 - local.tee $10 - local.tee $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 1 - i32.shl - local.tee $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $8 - call $~lib/memory/memory.fill + local.get $0 + call $~lib/map/Map#keys + local.set $4 + local.get $0 + call $~lib/map/Map#values + local.set $6 + i32.const 24 i32.const 16 - i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $5 + local.tee $3 i32.const 0 i32.store - local.get $5 + local.get $3 i32.const 0 i32.store offset=4 - local.get $5 + local.get $3 i32.const 0 i32.store offset=8 - local.get $5 + local.get $3 i32.const 0 i32.store offset=12 - local.get $0 - local.tee $2 - local.get $5 - i32.load - local.tee $11 - i32.ne - if + 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 $5 + loop $for-loop|4 local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $2 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $5 - local.get $7 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $10 - i32.lt_s - if - local.get $9 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 - local.get $2 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $5 - local.get $1 - call $~lib/array/Array#set:length - local.get $3 - call $~lib/map/Map#values - local.set $6 - i32.const 24 - i32.const 16 - call $~lib/rt/tlsf/__alloc - 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 - call $~lib/map/Map#constructor - local.set $0 - loop $for-loop|4 local.get $4 - local.get $5 i32.load offset=12 i32.lt_s if + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.ge_u if @@ -7078,20 +7106,20 @@ call $~lib/builtins/abort unreachable end - local.get $5 - i32.load offset=4 local.get $4 + i32.load offset=4 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.set $2 + local.set $1 local.get $6 - local.get $4 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $3 - local.get $2 + local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7102,7 +7130,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -7116,27 +7144,27 @@ call $~lib/builtins/abort unreachable end + local.get $3 + local.get $1 local.get $1 - local.get $2 - local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7148,7 +7176,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7161,16 +7189,16 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|6 - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7181,10 +7209,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 20 @@ -7198,11 +7226,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7212,14 +7240,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|6 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7232,16 +7260,16 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|8 - local.get $4 + local.get $2 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7251,17 +7279,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 - local.get $4 + 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 $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7272,11 +7300,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7286,14 +7314,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|8 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7305,9 +7333,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 call $~lib/map/Map#clear - local.get $3 + local.get $0 i32.load offset=20 if i32.const 0 @@ -7317,15 +7345,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) @@ -7424,16 +7452,15 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) call $~lib/map/Map#constructor - local.set $2 + local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -7443,15 +7470,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 - 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 $2 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7462,10 +7489,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7477,14 +7504,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 $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7497,14 +7524,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 $2 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7515,10 +7542,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7530,15 +7557,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 - 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 $2 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7549,10 +7576,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 20 i32.add i32.ne @@ -7564,14 +7591,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 $2 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7583,42 +7610,39 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $0 - local.get $2 + local.get $0 i32.load offset=8 - local.set $6 - local.get $2 + local.set $5 + local.get $0 i32.load offset=16 - local.tee $7 + local.tee $6 call $~lib/array/Array#constructor - local.set $5 + local.set $1 loop $for-loop|01 local.get $4 - local.get $7 + local.get $6 i32.lt_s if + local.get $5 local.get $4 i32.const 12 i32.mul - local.get $6 i32.add - local.tee $8 + local.tee $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $1 - i32.const 1 - i32.add - local.set $0 - local.get $5 local.get $1 - local.get $8 + local.get $3 + local.get $7 i32.load call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 end local.get $4 i32.const 1 @@ -7627,32 +7651,32 @@ br $for-loop|01 end end - local.get $5 - local.get $0 + local.get $1 + local.get $3 call $~lib/array/Array#set:length - local.get $2 + local.get $0 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $0 + local.set $3 call $~lib/map/Map#constructor - local.set $1 + local.set $4 loop $for-loop|2 - local.get $3 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $3 + local.get $1 + local.get $2 call $~lib/array/Array#__get - local.set $4 + local.set $5 local.get $6 - local.get $3 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $2 - local.get $4 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -7663,7 +7687,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -7677,27 +7701,27 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $4 - local.get $4 + local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 call $~lib/map/Map#set 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|2 end end - local.get $0 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7709,7 +7733,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7722,14 +7746,14 @@ unreachable end i32.const 0 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i32.const 50 i32.lt_s if + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7740,10 +7764,10 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#get - local.get $3 + local.get $2 i32.const 20 i32.add i32.ne @@ -7755,11 +7779,11 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#delete + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7769,14 +7793,14 @@ 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|3 end end - local.get $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7789,14 +7813,14 @@ unreachable end i32.const 0 - local.set $3 + local.set $2 loop $for-loop|4 - local.get $3 + local.get $2 i32.const 50 i32.lt_s if + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7806,15 +7830,15 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $2 local.get $2 - local.get $3 - local.get $3 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7825,11 +7849,11 @@ call $~lib/builtins/abort unreachable end + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#delete + local.get $0 local.get $2 - local.get $3 call $~lib/map/Map#has if i32.const 0 @@ -7839,14 +7863,14 @@ 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|4 end end - local.get $2 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7858,9 +7882,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/map/Map#clear - local.get $2 + local.get $0 i32.load offset=20 if i32.const 0 @@ -7870,16 +7894,133 @@ 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 $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#keys (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.tee $7 + local.set $6 + local.get $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 18 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 local.get $1 - call $~lib/rt/pure/__release + i32.store + local.get $0 local.get $2 - call $~lib/rt/pure/__release + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $8 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $8 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $9 + local.get $2 + i32.load + call $~lib/array/Array#__set + local.get $9 + i32.const 1 + i32.add + local.set $9 + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $0 + local.get $9 + call $~lib/array/Array#set:length + local.get $0 ) (func $std/map/testNumeric (local $0 i32) @@ -7890,40 +8031,36 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) i32.const 24 i32.const 17 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store - local.get $3 + local.get $0 i32.const 0 i32.store offset=4 - local.get $3 + local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=16 - local.get $3 + local.get $0 i32.const 0 i32.store offset=20 - local.get $3 + local.get $0 call $~lib/map/Map#clear loop $for-loop|0 local.get $1 i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has if @@ -7934,14 +8071,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + 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 $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -7953,7 +8090,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -7975,7 +8112,7 @@ br $for-loop|0 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7994,7 +8131,7 @@ i32.const 100 i32.lt_u if - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -8006,7 +8143,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -8021,14 +8158,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + 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 $3 + local.get $0 local.get $1 call $~lib/map/Map#has i32.eqz @@ -8040,7 +8177,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $1 call $~lib/map/Map#get local.get $1 @@ -8062,7 +8199,7 @@ br $for-loop|1 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -8074,120 +8211,17 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - local.get $3 - i32.load offset=8 - local.set $9 - local.get $3 - i32.load offset=16 - local.tee $10 - local.tee $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $7 - i32.const 2 - i32.shl - local.tee $8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $8 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.tee $2 - local.get $5 - i32.load - local.tee $11 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $2 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $8 - i32.store offset=8 - local.get $5 - local.get $7 - i32.store offset=12 - loop $for-loop|01 - local.get $6 - local.get $10 - i32.lt_s - if - local.get $9 - local.get $6 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 - local.get $2 - i32.load - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|01 - end - end - local.get $5 - local.get $1 - call $~lib/array/Array#set:length - local.get $3 - 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 $1 + local.get $0 + call $~lib/map/Map#keys + local.set $4 + 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 $1 i32.const 0 i32.store local.get $1 @@ -8208,23 +8242,23 @@ local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $0 + local.set $5 loop $for-loop|2 + local.get $2 local.get $4 - local.get $5 i32.load offset=12 i32.lt_s if - local.get $5 local.get $4 + local.get $2 call $~lib/array/Array#__get - local.set $2 + local.set $3 local.get $6 - local.get $4 + local.get $2 call $~lib/array/Array#__get local.set $7 + local.get $0 local.get $3 - local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8235,7 +8269,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -8250,22 +8284,22 @@ unreachable end local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $5 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 $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|2 end end @@ -8281,7 +8315,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -8294,14 +8328,14 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|3 - local.get $4 + local.get $2 i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8312,10 +8346,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $4 + local.get $2 i32.const 20 i32.add i32.ne @@ -8327,11 +8361,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8341,14 +8375,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|3 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -8361,14 +8395,14 @@ unreachable end i32.const 0 - local.set $4 + local.set $2 loop $for-loop|4 - local.get $4 + local.get $2 i32.const 50 i32.lt_u if - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8378,15 +8412,15 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 - local.get $4 + 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 $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8397,11 +8431,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $3 - local.get $4 + local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8411,14 +8445,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -8430,9 +8464,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 call $~lib/map/Map#clear - local.get $3 + local.get $0 i32.load offset=20 if i32.const 0 @@ -8442,15 +8476,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#clear (param $0 i32) @@ -8896,58 +8930,175 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#values (param $0 i32) (result i32) + (func $~lib/map/Map#keys (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 $3 + local.set $4 local.get $0 i32.load offset=16 - local.tee $4 - call $~lib/array/Array#constructor - 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 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.get $1 - local.get $5 - i32.load offset=8 - call $~lib/array/Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $1 - call $~lib/array/Array#set:length - local.get $0 - ) + local.tee $7 + local.set $6 + local.get $7 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 21 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $8 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $8 + i32.const 4 + i32.shl + i32.add + local.tee $2 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $9 + local.get $2 + i64.load + call $~lib/array/Array#__set + local.get $9 + i32.const 1 + i32.add + local.set $9 + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $0 + local.get $9 + call $~lib/array/Array#set:length + local.get $0 + ) + (func $~lib/map/Map#values (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 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 $0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + 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.get $1 + local.get $5 + i32.load offset=8 + call $~lib/array/Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $0 + local.get $1 + call $~lib/array/Array#set:length + local.get $0 + ) (func $~lib/map/Map#clear (param $0 i32) (local $1 i32) i32.const 16 @@ -9146,9 +9297,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -9166,9 +9317,9 @@ if (result i32) i32.const 0 else + local.get $1 local.get $3 i64.load - local.get $1 i64.eq end br_if $__inlined_func$~lib/map/Map#find @@ -9220,7 +9371,6 @@ end local.get $0 i32.load offset=8 - local.set $3 local.get $0 local.get $0 i32.load offset=16 @@ -9231,7 +9381,6 @@ local.get $5 i32.const 24 i32.mul - local.get $3 i32.add local.tee $3 local.get $1 @@ -9248,9 +9397,9 @@ local.get $3 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -9326,50 +9475,45 @@ end ) (func $std/map/testNumeric - (local $0 i32) + (local $0 i64) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) i32.const 24 i32.const 20 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.get $1 i32.const 0 i32.store offset=4 - local.get $4 + local.get $1 i32.const 0 i32.store offset=8 - local.get $4 + local.get $1 i32.const 0 i32.store offset=12 - local.get $4 + local.get $1 i32.const 0 i32.store offset=16 - local.get $4 + local.get $1 i32.const 0 i32.store offset=20 - local.get $4 + local.get $1 call $~lib/map/Map#clear loop $for-loop|0 - local.get $3 + local.get $0 i64.const 100 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -9379,16 +9523,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9399,10 +9543,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 10 i32.add @@ -9415,14 +9559,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|0 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -9435,14 +9579,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $0 i64.const 100 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9453,10 +9597,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 10 i32.add @@ -9469,16 +9613,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9489,10 +9633,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 20 i32.add @@ -9505,14 +9649,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|1 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -9524,157 +9668,54 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $11 - local.get $4 - i32.load offset=16 - local.tee $8 - local.set $9 - local.get $8 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $9 - i32.const 3 - i32.shl - local.tee $10 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $10 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 21 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $5 - i32.load - local.tee $12 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $12 - call $~lib/rt/pure/__release - end - local.get $5 local.get $1 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $10 - i32.store offset=8 - local.get $5 - local.get $9 - i32.store offset=12 - loop $for-loop|01 - local.get $6 - local.get $8 - i32.lt_s - if - local.get $11 - local.get $6 - i32.const 4 - i32.shl - i32.add - local.tee $1 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 - local.get $1 - i64.load - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|01 - end - end - local.get $5 - local.get $2 - call $~lib/array/Array#set:length - local.get $4 + call $~lib/map/Map#keys + local.set $5 + local.get $1 call $~lib/map/Map#values - local.set $2 + local.set $7 i32.const 24 i32.const 22 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 call $~lib/map/Map#constructor - local.set $1 + 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 $3 - local.get $2 + local.set $0 local.get $7 - call $~lib/array/Array#__get - local.set $6 - local.get $4 local.get $3 + call $~lib/array/Array#__get + local.set $4 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9685,8 +9726,8 @@ call $~lib/builtins/abort unreachable end + local.get $1 local.get $4 - local.get $6 i32.const 20 i32.sub i64.extend_i32_s @@ -9700,27 +9741,27 @@ call $~lib/builtins/abort unreachable end + local.get $2 + local.get $0 local.get $0 - local.get $3 - local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $6 + local.get $4 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - 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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -9732,7 +9773,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $6 i32.load offset=20 i32.const 100 i32.ne @@ -9745,14 +9786,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|3 - local.get $3 + local.get $0 i64.const 50 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9763,10 +9804,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 20 i32.add @@ -9779,11 +9820,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -9793,14 +9834,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|3 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -9813,14 +9854,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|4 - local.get $3 + local.get $0 i64.const 50 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -9830,16 +9871,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9850,11 +9891,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -9864,14 +9905,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|4 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -9883,9 +9924,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/map/Map#clear - local.get $4 + local.get $1 i32.load offset=20 if i32.const 0 @@ -9897,60 +9938,172 @@ end local.get $5 call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release ) - (func $std/map/testNumeric - (local $0 i32) + (func $~lib/map/Map#keys (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $7 + local.set $6 + local.get $7 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1472 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 24 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $8 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $8 + i32.const 4 + i32.shl + i32.add + local.tee $2 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $9 + local.get $2 + i64.load + call $~lib/array/Array#__set + local.get $9 + i32.const 1 + i32.add + local.set $9 + end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $0 + local.get $9 + call $~lib/array/Array#set:length + local.get $0 + ) + (func $std/map/testNumeric + (local $0 i64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) i32.const 24 i32.const 23 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.get $1 i32.const 0 i32.store offset=4 - local.get $4 + local.get $1 i32.const 0 i32.store offset=8 - local.get $4 + local.get $1 i32.const 0 i32.store offset=12 - local.get $4 + local.get $1 i32.const 0 i32.store offset=16 - local.get $4 + local.get $1 i32.const 0 i32.store offset=20 - local.get $4 + local.get $1 call $~lib/map/Map#clear loop $for-loop|0 - local.get $3 + local.get $0 i64.const 100 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -9960,16 +10113,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -9980,10 +10133,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 10 i32.add @@ -9996,14 +10149,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|0 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -10016,14 +10169,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $0 i64.const 100 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -10034,10 +10187,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 10 i32.add @@ -10050,16 +10203,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -10070,10 +10223,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 20 i32.add @@ -10086,14 +10239,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|1 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -10105,157 +10258,54 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $11 - local.get $4 - i32.load offset=16 - local.tee $8 - local.set $9 - local.get $8 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1472 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $9 - i32.const 3 - i32.shl - local.tee $10 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $10 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 24 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $5 - i32.load - local.tee $12 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $12 - call $~lib/rt/pure/__release - end - local.get $5 local.get $1 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $10 - i32.store offset=8 - local.get $5 - local.get $9 - i32.store offset=12 - loop $for-loop|01 - local.get $6 - local.get $8 - i32.lt_s - if - local.get $11 - local.get $6 - i32.const 4 - i32.shl - i32.add - local.tee $1 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 - local.get $1 - i64.load - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|01 - end - end - local.get $5 - local.get $2 - call $~lib/array/Array#set:length - local.get $4 + call $~lib/map/Map#keys + local.set $5 + local.get $1 call $~lib/map/Map#values - local.set $2 + local.set $7 i32.const 24 i32.const 25 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 call $~lib/map/Map#constructor - local.set $1 + 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 $3 - local.get $2 + local.set $0 local.get $7 - call $~lib/array/Array#__get - local.set $6 - local.get $4 local.get $3 + call $~lib/array/Array#__get + local.set $4 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -10266,8 +10316,8 @@ call $~lib/builtins/abort unreachable end + local.get $1 local.get $4 - local.get $6 i32.const 20 i32.sub i64.extend_i32_s @@ -10281,27 +10331,27 @@ call $~lib/builtins/abort unreachable end + local.get $2 + local.get $0 local.get $0 - local.get $3 - local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $6 + local.get $4 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - 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 $0 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -10313,7 +10363,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $6 i32.load offset=20 i32.const 100 i32.ne @@ -10326,14 +10376,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|3 - local.get $3 + local.get $0 i64.const 50 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -10344,10 +10394,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#get - local.get $3 + local.get $0 i32.wrap_i64 i32.const 20 i32.add @@ -10360,11 +10410,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -10374,14 +10424,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|3 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -10394,14 +10444,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|4 - local.get $3 + local.get $0 i64.const 50 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -10411,16 +10461,16 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 - local.get $3 + local.get $1 + local.get $0 + local.get $0 i32.wrap_i64 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -10431,11 +10481,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/map/Map#has if i32.const 0 @@ -10445,14 +10495,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|4 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -10464,9 +10514,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/map/Map#clear - local.get $4 + local.get $1 i32.load offset=20 if i32.const 0 @@ -10478,14 +10528,14 @@ end local.get $5 call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release ) (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 @@ -10788,22 +10838,22 @@ (func $~lib/map/Map#keys (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 i32) (local $9 i32) - (local $10 f32) + (local $10 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $5 local.get $0 i32.load offset=16 - local.tee $5 - local.set $6 - local.get $5 + local.tee $8 + local.set $7 + local.get $8 i32.const 268435452 i32.gt_u if @@ -10814,14 +10864,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const 2 i32.shl - local.tee $7 + local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $6 call $~lib/memory/memory.fill i32.const 16 i32.const 27 @@ -10839,39 +10889,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 $7 + local.get $6 i32.store offset=8 local.get $0 - local.get $6 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $8 i32.lt_s if - local.get $8 - local.get $4 + local.get $5 + local.get $9 i32.const 12 i32.mul i32.add @@ -10881,20 +10931,15 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $2 f32.load - local.set $10 - local.get $1 + local.set $3 + local.get $10 local.get $0 i32.load offset=12 i32.ge_u if - local.get $1 + local.get $10 i32.const 0 i32.lt_s if @@ -10906,7 +10951,7 @@ unreachable end local.get $0 - local.get $1 + local.get $10 i32.const 1 i32.add local.tee $2 @@ -10918,22 +10963,26 @@ end local.get $0 i32.load offset=4 - local.get $1 + local.get $10 i32.const 2 i32.shl i32.add - local.get $10 + local.get $3 f32.store + local.get $10 + i32.const 1 + i32.add + local.set $10 end - 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 $0 - local.get $3 + local.get $10 call $~lib/array/Array#set:length local.get $0 ) @@ -12015,22 +12064,22 @@ (func $~lib/map/Map#keys (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 i32) (local $9 i32) - (local $10 f64) + (local $10 i32) local.get $0 i32.load offset=8 - local.set $8 + local.set $5 local.get $0 i32.load offset=16 - local.tee $5 - local.set $6 - local.get $5 + local.tee $8 + local.set $7 + local.get $8 i32.const 134217726 i32.gt_u if @@ -12041,14 +12090,14 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const 3 i32.shl - local.tee $7 + local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $7 + local.tee $2 + local.get $6 call $~lib/memory/memory.fill i32.const 16 i32.const 30 @@ -12066,39 +12115,39 @@ local.get $0 i32.const 0 i32.store offset=12 - 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 $9 + local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - local.get $9 + 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 $7 + local.get $6 i32.store offset=8 local.get $0 - local.get $6 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $9 + local.get $8 i32.lt_s if - local.get $8 - local.get $4 + local.get $5 + local.get $9 i32.const 4 i32.shl i32.add @@ -12108,20 +12157,15 @@ i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 local.get $2 f64.load - local.set $10 - local.get $1 + local.set $3 + local.get $10 local.get $0 i32.load offset=12 i32.ge_u if - local.get $1 + local.get $10 i32.const 0 i32.lt_s if @@ -12133,7 +12177,7 @@ unreachable end local.get $0 - local.get $1 + local.get $10 i32.const 1 i32.add local.tee $2 @@ -12145,22 +12189,26 @@ end local.get $0 i32.load offset=4 - local.get $1 + local.get $10 i32.const 3 i32.shl i32.add - local.get $10 + local.get $3 f64.store + local.get $10 + i32.const 1 + i32.add + local.set $10 end - 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 $0 - local.get $3 + local.get $10 call $~lib/array/Array#set:length local.get $0 ) @@ -12310,9 +12358,9 @@ local.set $4 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl @@ -12384,7 +12432,6 @@ end local.get $0 i32.load offset=8 - local.set $3 local.get $0 local.get $0 i32.load offset=16 @@ -12395,7 +12442,6 @@ local.get $5 i32.const 24 i32.mul - local.get $3 i32.add local.tee $3 local.get $1 @@ -12412,9 +12458,9 @@ local.get $3 local.get $0 i32.load + local.get $4 local.get $0 i32.load offset=4 - local.get $4 i32.and i32.const 2 i32.shl diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index c0025677b3..51f891ee93 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1874,12 +1874,13 @@ (local $3 f64) (local $4 i64) local.get $0 + local.tee $3 i64.reinterpret_f64 local.tee $4 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $3 + local.set $0 local.get $4 i64.const 52 i64.shr_u @@ -1889,43 +1890,43 @@ i64.const 1049 i64.ge_u if - local.get $3 + local.get $0 call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - local.set $3 + local.set $0 else local.get $4 i64.const 1024 i64.ge_u if f64.const 2 - local.get $3 + local.get $0 f64.mul f64.const 1 - local.get $3 - local.get $3 + local.get $0 + local.get $0 f64.mul f64.const 1 f64.add f64.sqrt - local.get $3 + local.get $0 f64.add f64.div f64.add call $~lib/math/NativeMath.log - local.set $3 + local.set $0 else local.get $4 i64.const 997 i64.ge_u if - local.get $3 - local.get $3 - local.get $3 + local.get $0 + local.get $0 + local.get $0 f64.mul - local.tee $3 - local.get $3 + local.tee $0 + local.get $0 f64.const 1 f64.add f64.sqrt @@ -1934,18 +1935,18 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - local.set $3 + local.set $0 end end end - local.get $3 local.get $0 + local.get $3 f64.copysign local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $0 + local.get $3 call $~lib/bindings/Math/asinh local.get $1 local.get $2 @@ -1958,53 +1959,54 @@ (local $3 f32) (local $4 i32) local.get $0 + local.tee $3 i32.reinterpret_f32 i32.const 2147483647 i32.and local.tee $4 f32.reinterpret_i32 - local.set $3 + local.set $0 local.get $4 i32.const 1166016512 i32.ge_u if - local.get $3 + local.get $0 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - local.set $3 + local.set $0 else local.get $4 i32.const 1073741824 i32.ge_u if f32.const 2 - local.get $3 + local.get $0 f32.mul f32.const 1 - local.get $3 - local.get $3 + local.get $0 + local.get $0 f32.mul f32.const 1 f32.add f32.sqrt - local.get $3 + local.get $0 f32.add f32.div f32.add call $~lib/math/NativeMathf.log - local.set $3 + local.set $0 else local.get $4 i32.const 964689920 i32.ge_u if - local.get $3 - local.get $3 - local.get $3 + local.get $0 + local.get $0 + local.get $0 f32.mul - local.tee $3 - local.get $3 + local.tee $0 + local.get $0 f32.const 1 f32.add f32.sqrt @@ -2013,12 +2015,12 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $3 + local.set $0 end end end - local.get $3 local.get $0 + local.get $3 f32.copysign local.get $1 local.get $2 @@ -2469,9 +2471,10 @@ (local $4 i64) (local $5 f64) local.get $0 + local.tee $3 f64.abs - local.set $3 - local.get $0 + local.set $0 + local.get $3 i64.reinterpret_f64 i64.const 52 i64.shr_u @@ -2487,42 +2490,42 @@ if f64.const 0.5 f64.const 2 - local.get $3 + local.get $0 f64.mul local.tee $5 local.get $5 - local.get $3 + local.get $0 f64.mul f64.const 1 - local.get $3 + local.get $0 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - local.set $3 + local.set $0 end else f64.const 0.5 f64.const 2 - local.get $3 + local.get $0 f64.const 1 - local.get $3 + local.get $0 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul - local.set $3 + local.set $0 end - local.get $3 local.get $0 + local.get $3 f64.copysign 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 @@ -2535,9 +2538,10 @@ (local $3 f32) (local $4 i32) local.get $0 + local.tee $3 f32.abs - local.set $3 - local.get $0 + local.set $0 + local.get $3 i32.reinterpret_f32 local.tee $4 i32.const 1056964608 @@ -2549,35 +2553,35 @@ if f32.const 0.5 f32.const 2 - local.get $3 + local.get $0 f32.mul f32.const 1 - local.get $3 + local.get $0 f32.const 1 - local.get $3 + local.get $0 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $3 + local.set $0 end else f32.const 0.5 f32.const 2 - local.get $3 + local.get $0 f32.const 1 - local.get $3 + local.get $0 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $3 + local.set $0 end - local.get $3 local.get $0 + local.get $3 f32.copysign local.get $1 local.get $2 @@ -11226,6 +11230,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 @@ -38344,17 +38350,17 @@ 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 - local.get $3 i64.xor local.tee $3 local.get $3 i64.const 17 i64.shr_u i64.xor - local.get $4 i64.xor local.get $4 i64.const 26 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 1ccbff7645..6139deaace 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -151,16 +151,16 @@ local.set $1 local.get $2 if - local.get $0 + local.get $3 i32.load16_u local.tee $2 - local.get $3 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $2 local.get $4 + local.get $2 i32.sub return end @@ -177,7 +177,7 @@ end i32.const 0 ) - (func $start:std/object-literal + (func $~start (local $0 i32) (local $1 i32) i32.const 1136 @@ -207,7 +207,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1040 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -215,18 +215,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 1040 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 @@ -279,7 +279,4 @@ unreachable end ) - (func $~start - call $start:std/object-literal - ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 9474608b1a..6d1b020b39 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -2075,13 +2075,11 @@ global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 - local.set $1 - local.get $0 i32.load if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load offset=4 i32.eqz end diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index c19a897f7d..28130fa71a 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -224,8 +224,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/one global.get $std/pointer/two + global.get $std/pointer/one i32.add global.set $std/pointer/add global.get $std/pointer/add diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 2dca78a90b..e895d0b7da 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))) @@ -927,9 +927,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -937,14 +937,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -953,18 +953,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -976,9 +976,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -995,7 +995,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1003,9 +1003,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1017,11 +1017,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1031,25 +1031,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -1962,7 +1962,6 @@ i32.load local.set $3 call $~lib/rt/tlsf/maybeInitialize - local.set $6 local.get $3 i32.const 16 i32.sub @@ -2001,35 +2000,34 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $6 local.get $4 local.get $1 local.get $2 i32.shl - local.tee $1 + local.tee $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $1 + local.get $5 i32.add - local.get $1 + local.get $2 local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $2 + local.get $1 local.get $3 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 $1 + local.get $2 i32.store offset=8 end ) @@ -2069,6 +2067,115 @@ local.get $2 i32.store8 ) + (func $~lib/set/Set#values (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 $5 + local.get $0 + i32.load offset=16 + local.tee $4 + local.tee $8 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 4 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $8 + i32.store offset=8 + local.get $0 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $4 + i32.lt_s + if + local.get $5 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $6 + local.get $2 + i32.load8_s + call $~lib/array/Array#__set + local.get $6 + i32.const 1 + i32.add + local.set $6 + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + local.get $0 + ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2156,17 +2263,10 @@ (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/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -2174,8 +2274,8 @@ i32.const 100 i32.lt_s if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -2185,12 +2285,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -2201,14 +2301,14 @@ 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 $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -2221,9 +2321,9 @@ unreachable end i32.const 50 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -2231,8 +2331,8 @@ i32.const 100 i32.lt_s if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -2243,12 +2343,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -2259,14 +2359,14 @@ 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|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -2278,116 +2378,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $8 - local.get $4 - i32.load offset=16 - local.tee $9 - local.tee $6 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $6 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $10 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $10 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 local.get $0 - i32.store offset=4 - local.get $3 - local.get $6 - i32.store offset=8 - local.get $3 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $9 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|4 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -2399,22 +2403,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -2426,9 +2430,9 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|6 - local.get $5 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2436,8 +2440,8 @@ i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -2448,11 +2452,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -2462,14 +2466,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|6 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -2482,9 +2486,9 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|8 - local.get $5 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2492,8 +2496,8 @@ i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -2503,12 +2507,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -2519,11 +2523,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -2533,14 +2537,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|8 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -2552,9 +2556,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -2564,12 +2568,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -2826,6 +2830,115 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $~lib/set/Set#values (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 $5 + local.get $0 + i32.load offset=16 + local.tee $4 + local.tee $8 + i32.const 1073741808 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $8 + call $~lib/memory/memory.fill + i32.const 16 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $8 + i32.store offset=8 + local.get $0 + local.get $8 + i32.store offset=12 + loop $for-loop|0 + local.get $7 + local.get $4 + i32.lt_s + if + local.get $5 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $6 + local.get $2 + i32.load8_u + call $~lib/array/Array#__set + local.get $6 + i32.const 1 + i32.add + local.set $6 + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|0 + end + end + local.get $0 + ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2911,24 +3024,17 @@ (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/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $2 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -2938,12 +3044,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -2954,14 +3060,14 @@ 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 $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -2974,16 +3080,16 @@ unreachable end i32.const 50 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -2994,12 +3100,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -3010,14 +3116,14 @@ 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|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3029,116 +3135,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $8 - local.get $4 - i32.load offset=16 - local.tee $9 - local.tee $6 - i32.const 1073741808 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $6 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 6 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $10 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $10 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 local.get $0 - i32.store offset=4 - local.get $3 - local.get $6 - i32.store offset=8 - local.get $3 - local.get $6 - i32.store offset=12 - loop $for-loop|0 - local.get $7 - local.get $9 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|4 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3150,22 +3160,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -3177,16 +3187,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|6 - local.get $5 + local.get $1 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -3197,11 +3207,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -3211,14 +3221,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|6 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3231,16 +3241,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|8 - local.get $5 + local.get $1 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -3250,12 +3260,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -3266,11 +3276,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -3280,14 +3290,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|8 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3299,9 +3309,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -3311,12 +3321,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -3673,28 +3683,142 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $~lib/set/Set#values (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=12 - i32.ge_u + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $7 + local.set $6 + local.get $7 + i32.const 536870904 + i32.gt_u if - i32.const 1408 + i32.const 1200 i32.const 1360 - i32.const 104 - i32.const 42 + i32.const 57 + i32.const 60 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.get $1 + local.get $6 i32.const 1 i32.shl - i32.add - i32.load16_s - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i32.load16_s + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end + end + local.get $0 + ) + (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 1408 + i32.const 1360 + i32.const 104 + i32.const 42 + 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/set/Set#delete (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3762,18 +3886,10 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -3781,8 +3897,8 @@ i32.const 100 i32.lt_s if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -3792,12 +3908,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -3808,14 +3924,14 @@ 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 $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3828,9 +3944,9 @@ unreachable end i32.const 50 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -3838,8 +3954,8 @@ i32.const 100 i32.lt_s if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -3850,12 +3966,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -3866,14 +3982,14 @@ 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|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3885,120 +4001,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $10 - local.get $4 - i32.load offset=16 - local.tee $7 - local.set $8 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 1 - i32.shl - local.tee $9 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $9 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 8 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $11 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 local.get $0 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $3 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $7 - i32.lt_s - if - local.get $10 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|4 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4010,22 +4026,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -4037,9 +4053,9 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|6 - local.get $5 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -4047,8 +4063,8 @@ i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4059,11 +4075,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4073,14 +4089,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|6 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4093,9 +4109,9 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|8 - local.get $5 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -4103,8 +4119,8 @@ i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4114,12 +4130,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4130,11 +4146,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4144,14 +4160,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|8 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4163,9 +4179,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -4175,12 +4191,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -4395,47 +4411,161 @@ end call $~lib/set/Set#rehash end - local.get $0 - i32.load offset=8 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=16 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.tee $2 - local.get $1 - i32.store16 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $0 - i32.load - local.get $3 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $1 - i32.load - i32.store offset=4 - local.get $1 - local.get $2 - i32.store + local.get $0 + i32.load offset=8 + local.get $0 + local.get $0 + i32.load offset=16 + local.tee $4 + i32.const 1 + i32.add + i32.store offset=16 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.tee $2 + local.get $1 + i32.store16 + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $2 + local.get $0 + i32.load + local.get $3 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=4 + local.get $1 + local.get $2 + i32.store + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/set/Set#values (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.tee $7 + local.set $6 + local.get $7 + i32.const 536870904 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i32.load16_u + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end end local.get $0 - call $~lib/rt/pure/__retain ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 @@ -4524,25 +4654,17 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $2 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -4552,12 +4674,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -4568,14 +4690,14 @@ 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 $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4588,16 +4710,16 @@ unreachable end i32.const 50 - local.set $3 + local.set $2 loop $for-loop|3 - local.get $3 + local.get $2 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -4608,12 +4730,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -4624,14 +4746,14 @@ 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|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4643,120 +4765,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $10 - local.get $4 - i32.load offset=16 - local.tee $7 - local.set $8 - local.get $7 - i32.const 536870904 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 1 - i32.shl - local.tee $9 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $9 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 10 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $11 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 local.get $0 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $3 - local.get $8 - i32.store offset=12 - loop $for-loop|0 - local.get $6 - local.get $7 - i32.lt_s - if - local.get $10 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|4 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4768,22 +4790,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -4795,16 +4817,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|6 - local.get $5 + local.get $1 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4815,11 +4837,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4829,14 +4851,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|6 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4849,16 +4871,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|8 - local.get $5 + local.get $1 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4868,12 +4890,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -4884,11 +4906,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -4898,14 +4920,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|8 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4917,9 +4939,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -4929,12 +4951,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -5297,6 +5319,120 @@ local.get $2 i32.store ) + (func $~lib/set/Set#values (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.tee $7 + local.set $6 + local.get $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 12 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i32.load + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end + end + local.get $0 + ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -5382,23 +5518,15 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|0 - local.get $3 + local.get $2 i32.const 100 i32.lt_s if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -5408,12 +5536,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -5424,193 +5552,93 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 10 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 50 - local.set $3 - loop $for-loop|1 - local.get $3 - i32.const 100 - i32.lt_s - if - local.get $4 - local.get $3 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $4 - local.get $3 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $4 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=8 - local.set $10 - local.get $4 - i32.load offset=16 - local.tee $7 - local.set $8 - local.get $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 2 - i32.shl - local.tee $9 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $9 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 + local.set $2 + br $for-loop|0 + end + end local.get $0 - local.get $3 - i32.load - local.tee $11 + i32.load offset=20 + i32.const 100 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $11 - call $~lib/rt/pure/__release + i32.const 0 + i32.const 1312 + i32.const 10 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 - local.get $1 - i32.store - local.get $3 - local.get $0 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $3 - local.get $8 - i32.store offset=12 - loop $for-loop|01 - local.get $6 - local.get $7 + i32.const 50 + local.set $2 + loop $for-loop|1 + local.get $2 + i32.const 100 i32.lt_s if - local.get $10 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and + local.get $0 + local.get $2 + call $~lib/set/Set#has i32.eqz if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load - call $~lib/array/Array#__set + i32.const 0 + i32.const 1312 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $6 + local.get $0 + local.get $2 + call $~lib/set/Set#add + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 i32.const 1 i32.add - local.set $6 - br $for-loop|01 + local.set $2 + br $for-loop|1 end end + local.get $0 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|2 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5622,22 +5650,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|2 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -5649,14 +5677,14 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|3 - local.get $5 + local.get $1 i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -5667,11 +5695,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -5681,14 +5709,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -5701,14 +5729,14 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|4 - local.get $5 + local.get $1 i32.const 50 i32.lt_s if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -5718,12 +5746,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -5734,11 +5762,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -5748,14 +5776,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -5767,9 +5795,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -5779,12 +5807,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (result i32) (local $0 i32) @@ -5808,10 +5836,124 @@ i32.const 0 i32.store offset=16 local.get $0 - i32.const 0 - i32.store offset=20 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#values (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.tee $7 + local.set $6 + local.get $7 + i32.const 268435452 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 2 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 local.get $0 - call $~lib/set/Set#clear + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i32.load + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end + end local.get $0 ) (func $std/set/testNumeric @@ -5819,23 +5961,15 @@ (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 $11 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $0 loop $for-loop|0 - local.get $3 + local.get $2 i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -5845,12 +5979,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -5861,14 +5995,14 @@ 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|0 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5881,14 +6015,14 @@ unreachable end i32.const 50 - local.set $3 + local.set $2 loop $for-loop|1 - local.get $3 + local.get $2 i32.const 100 i32.lt_u if - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -5899,12 +6033,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $0 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -5915,14 +6049,14 @@ 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 $4 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5934,120 +6068,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $10 - local.get $4 - i32.load offset=16 - local.tee $7 - local.set $8 - local.get $7 - i32.const 268435452 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $8 - i32.const 2 - i32.shl - local.tee $9 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $9 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - 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 $0 - local.set $1 - local.get $0 - local.get $3 - i32.load - local.tee $11 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $11 - call $~lib/rt/pure/__release - end - local.get $3 - local.get $1 - i32.store - local.get $3 local.get $0 - i32.store offset=4 - local.get $3 - local.get $9 - i32.store offset=8 - local.get $3 - local.get $8 - i32.store offset=12 - loop $for-loop|01 - local.get $6 - local.get $7 - i32.lt_s - if - local.get $10 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $3 - local.get $0 - local.get $1 - i32.load - call $~lib/array/Array#__set - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|01 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $3 loop $for-loop|2 - local.get $5 - local.get $3 + local.get $1 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $3 - local.get $5 + local.get $0 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6059,22 +6093,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $3 - local.get $5 + local.get $2 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|2 end end - local.get $0 + local.get $3 i32.load offset=20 - local.get $4 + local.get $0 i32.load offset=20 i32.ne if @@ -6086,14 +6120,14 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|3 - local.get $5 + local.get $1 i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -6104,11 +6138,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -6118,14 +6152,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|3 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6138,14 +6172,14 @@ unreachable end i32.const 0 - local.set $5 + local.set $1 loop $for-loop|4 - local.get $5 + local.get $1 i32.const 50 i32.lt_u if - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -6155,12 +6189,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has i32.eqz if @@ -6171,11 +6205,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#delete - local.get $4 - local.get $5 + local.get $0 + local.get $1 call $~lib/set/Set#has if i32.const 0 @@ -6185,14 +6219,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 1 i32.add - local.set $5 + local.set $1 br $for-loop|4 end end - local.get $4 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6204,9 +6238,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/set/Set#clear - local.get $4 + local.get $0 i32.load offset=20 if i32.const 0 @@ -6216,12 +6250,12 @@ 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 $4 - call $~lib/rt/pure/__release ) (func $~lib/set/Set#clear (param $0 i32) (local $1 i32) @@ -6652,6 +6686,120 @@ local.get $2 i64.store ) + (func $~lib/set/Set#values (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.tee $7 + local.set $6 + local.get $7 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 4 + i32.shl + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i64.load + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end + end + local.get $0 + ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 @@ -6734,28 +6882,20 @@ end ) (func $std/set/testNumeric - (local $0 i32) + (local $0 i64) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $1 loop $for-loop|0 - local.get $3 + local.get $0 i64.const 100 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -6765,12 +6905,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -6781,14 +6921,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|0 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -6801,173 +6941,73 @@ unreachable end i64.const 50 - local.set $3 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $0 i64.const 100 i64.lt_s if - local.get $4 - local.get $3 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 14 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $3 - call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $4 - local.get $3 - call $~lib/set/Set#has - i32.eqz - if - i32.const 0 - i32.const 1312 - i32.const 16 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i64.const 1 - i64.add - local.set $3 - br $for-loop|1 - end - end - local.get $4 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 18 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=8 - local.set $11 - local.get $4 - i32.load offset=16 - local.tee $8 - local.set $9 - local.get $8 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $9 - i32.const 3 - i32.shl - local.tee $10 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $10 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $5 - i32.load - local.tee $12 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $12 - call $~lib/rt/pure/__release - end - local.get $5 - local.get $1 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $10 - i32.store offset=8 - local.get $5 - local.get $9 - i32.store offset=12 - loop $for-loop|01 - local.get $7 - local.get $8 - i32.lt_s - if - local.get $11 - local.get $7 - i32.const 4 - i32.shl - i32.add - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.and + local.get $1 + local.get $0 + call $~lib/set/Set#has i32.eqz if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 - local.get $1 - i64.load - call $~lib/array/Array#__set + i32.const 0 + i32.const 1312 + i32.const 14 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|01 + local.get $1 + local.get $0 + call $~lib/set/Set#add + call $~lib/rt/pure/__release + local.get $1 + local.get $0 + call $~lib/set/Set#has + i32.eqz + if + i32.const 0 + i32.const 1312 + i32.const 16 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64.const 1 + i64.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 1312 + i32.const 18 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|2 - local.get $6 - local.get $5 + local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $5 - local.get $6 + local.get $1 + local.get $2 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6979,23 +7019,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - local.get $6 + local.get $4 + local.get $2 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|2 end end - local.get $0 - i32.load offset=20 local.get $4 i32.load offset=20 + local.get $1 + i32.load offset=20 i32.ne if i32.const 0 @@ -7006,14 +7046,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|3 - local.get $3 + local.get $0 i64.const 50 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7024,11 +7064,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7038,14 +7078,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|3 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -7058,14 +7098,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|4 - local.get $3 + local.get $0 i64.const 50 i64.lt_s if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7075,12 +7115,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7091,11 +7131,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7105,14 +7145,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|4 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -7124,9 +7164,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/set/Set#clear - local.get $4 + local.get $1 i32.load offset=20 if i32.const 0 @@ -7136,12 +7176,12 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 + 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 (result i32) (local $0 i32) @@ -7171,29 +7211,135 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric - (local $0 i32) + (func $~lib/set/Set#values (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.tee $7 + local.set $6 + local.get $7 + i32.const 134217726 + i32.gt_u + if + i32.const 1200 + i32.const 1360 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $5 + call $~lib/memory/memory.fill + i32.const 16 + i32.const 18 + 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 $2 + local.set $1 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 4 + i32.shl + i32.add + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.get $8 + local.get $2 + i64.load + call $~lib/array/Array#__set + local.get $8 + i32.const 1 + i32.add + local.set $8 + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|0 + end + end + local.get $0 + ) + (func $std/set/testNumeric + (local $0 i64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) call $~lib/set/Set#constructor - local.set $4 + local.set $1 loop $for-loop|0 - local.get $3 + local.get $0 i64.const 100 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7203,12 +7349,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7219,14 +7365,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|0 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7239,14 +7385,14 @@ unreachable end i64.const 50 - local.set $3 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $0 i64.const 100 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7257,12 +7403,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7273,14 +7419,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|1 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7292,120 +7438,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 - local.set $11 - local.get $4 - i32.load offset=16 - local.tee $8 - local.set $9 - local.get $8 - i32.const 134217726 - i32.gt_u - if - i32.const 1200 - i32.const 1360 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $9 - i32.const 3 - i32.shl - local.tee $10 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $10 - call $~lib/memory/memory.fill - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $5 - i32.const 0 - i32.store - local.get $5 - i32.const 0 - i32.store offset=4 - local.get $5 - i32.const 0 - i32.store offset=8 - local.get $5 - i32.const 0 - i32.store offset=12 - local.get $0 - local.set $1 - local.get $0 - local.get $5 - i32.load - local.tee $12 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $12 - call $~lib/rt/pure/__release - end - local.get $5 local.get $1 - i32.store - local.get $5 - local.get $0 - i32.store offset=4 - local.get $5 - local.get $10 - i32.store offset=8 - local.get $5 - local.get $9 - i32.store offset=12 - loop $for-loop|01 - local.get $7 - local.get $8 - i32.lt_s - if - local.get $11 - local.get $7 - i32.const 4 - i32.shl - i32.add - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 - local.get $1 - i64.load - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|01 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $0 + local.set $4 loop $for-loop|2 - local.get $6 - local.get $5 + local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $5 - local.get $6 + local.get $1 + local.get $2 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7417,23 +7463,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 - local.get $6 + local.get $4 + local.get $2 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|2 end end - local.get $0 - i32.load offset=20 local.get $4 i32.load offset=20 + local.get $1 + i32.load offset=20 i32.ne if i32.const 0 @@ -7444,14 +7490,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|3 - local.get $3 + local.get $0 i64.const 50 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7462,11 +7508,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7476,14 +7522,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|3 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -7496,14 +7542,14 @@ unreachable end i64.const 0 - local.set $3 + local.set $0 loop $for-loop|4 - local.get $3 + local.get $0 i64.const 50 i64.lt_u if - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7513,12 +7559,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -7529,11 +7575,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#delete - local.get $4 - local.get $3 + local.get $1 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -7543,14 +7589,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i64.const 1 i64.add - local.set $3 + local.set $0 br $for-loop|4 end end - local.get $4 + local.get $1 i32.load offset=20 i32.const 50 i32.ne @@ -7562,9 +7608,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 call $~lib/set/Set#clear - local.get $4 + local.get $1 i32.load offset=20 if i32.const 0 @@ -7574,12 +7620,12 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 + 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 (result i32) (local $0 i32) @@ -7966,21 +8012,17 @@ i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 - local.get $2 + local.get $1 f32.load local.set $10 - local.get $1 + local.get $3 + local.tee $1 local.get $0 i32.load offset=12 i32.ge_u @@ -8015,6 +8057,10 @@ i32.add local.get $10 f32.store + local.get $1 + i32.const 1 + i32.add + local.set $3 end local.get $4 i32.const 1 @@ -8794,21 +8840,17 @@ i32.const 4 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.tee $1 - i32.const 1 - i32.add - local.set $3 - local.get $2 + local.get $1 f64.load local.set $10 - local.get $1 + local.get $3 + local.tee $1 local.get $0 i32.load offset=12 i32.ge_u @@ -8843,6 +8885,10 @@ i32.add local.get $10 f64.store + local.get $1 + i32.const 1 + i32.add + local.set $3 end local.get $4 i32.const 1 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 88276f236d..ec97281e2d 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -951,15 +951,15 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.const 16 - local.get $4 + local.get $3 i32.const 16 i32.gt_u select - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -967,14 +967,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $5 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -983,18 +983,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1005,18 +1005,18 @@ i32.and i32.const 16 i32.shr_u - local.set $4 + local.set $5 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $5 memory.grow i32.const 0 i32.lt_s @@ -1025,7 +1025,7 @@ end end local.get $0 - local.get $5 + local.get $3 i32.const 16 i32.shl memory.size @@ -1033,9 +1033,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1047,11 +1047,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1061,25 +1061,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index be9365d031..3968bce926 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1250,9 +1250,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -1260,14 +1260,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -1276,18 +1276,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1299,9 +1299,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -1318,7 +1318,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1326,9 +1326,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1340,11 +1340,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1354,25 +1354,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2924,77 +2924,74 @@ if local.get $0 i32.wrap_i64 - local.tee $2 local.tee $1 + i32.const 10 + i32.ge_u + i32.const 1 + i32.add + local.get $1 + i32.const 10000 + i32.ge_u + i32.const 3 + i32.add + local.get $1 + i32.const 1000 + i32.ge_u + i32.add + local.get $1 + i32.const 100 + i32.lt_u + select + local.get $1 + i32.const 1000000 + i32.ge_u + i32.const 6 + i32.add + local.get $1 + i32.const 1000000000 + i32.ge_u + i32.const 8 + i32.add + local.get $1 + i32.const 100000000 + i32.ge_u + i32.add + local.get $1 + i32.const 10000000 + i32.lt_u + select + local.get $1 i32.const 100000 i32.lt_u - if (result i32) - local.get $1 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $1 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $1 - i32.const 1000 - i32.ge_u - i32.add - local.get $1 - i32.const 100 - i32.lt_u - select - else - local.get $1 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $1 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $1 - i32.const 100000000 - i32.ge_u - i32.add - local.get $1 - i32.const 10000000 - i32.lt_u - select - end - local.tee $1 + select + local.tee $2 i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc local.tee $4 local.set $3 loop $do-continue|0 - local.get $2 + local.get $1 i32.const 10 i32.rem_u local.set $5 - local.get $2 + local.get $1 i32.const 10 i32.div_u - local.set $2 - local.get $1 + local.set $1 + local.get $3 + local.get $2 i32.const 1 i32.sub - local.tee $1 + local.tee $2 i32.const 1 i32.shl - local.get $3 i32.add local.get $5 i32.const 48 i32.add i32.store16 - local.get $2 + local.get $1 br_if $do-continue|0 end else @@ -3058,13 +3055,13 @@ i64.const 10 i64.div_u local.set $0 + local.get $2 local.get $1 i32.const 1 i32.sub local.tee $1 i32.const 1 i32.shl - local.get $2 i32.add local.get $3 i32.const 48 @@ -4411,10 +4408,10 @@ i64.const 0 i64.ge_u if + local.get $4 local.get $0 i64.const 16 i64.shl - local.get $4 i64.add local.set $4 end @@ -4426,10 +4423,10 @@ i64.const 0 i64.ge_u if + local.get $4 local.get $0 i64.const 32 i64.shl - local.get $4 i64.add local.set $4 end @@ -4446,10 +4443,10 @@ i64.const 0 i64.ge_u if + local.get $0 local.get $1 i64.const 16 i64.shl - local.get $0 i64.add local.set $0 end @@ -4461,10 +4458,10 @@ i64.const 0 i64.ge_u if + local.get $0 local.get $1 i64.const 32 i64.shl - local.get $0 i64.add local.set $0 end @@ -4481,10 +4478,10 @@ i64.const 0 i64.ge_u if + local.get $1 local.get $2 i64.const 16 i64.shl - local.get $1 i64.add local.set $1 end @@ -4496,10 +4493,10 @@ i64.const 0 i64.ge_u if + local.get $1 local.get $2 i64.const 32 i64.shl - local.get $1 i64.add local.set $1 end @@ -4516,10 +4513,10 @@ i64.const 0 i64.ge_u if + local.get $2 local.get $7 i64.const 16 i64.shl - local.get $2 i64.add local.set $2 end @@ -4531,10 +4528,10 @@ i64.const 0 i64.ge_u if + local.get $2 local.get $7 i64.const 32 i64.shl - local.get $2 i64.add local.set $2 end diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 65a30c54c8..0e16ace529 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -983,9 +983,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -993,14 +993,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -1009,18 +1009,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1032,9 +1032,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -1051,7 +1051,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1059,9 +1059,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1073,11 +1073,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1087,25 +1087,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2458,7 +2458,7 @@ local.get $0 local.get $1 i32.add - local.tee $6 + local.tee $4 local.get $0 i32.lt_u if @@ -2474,11 +2474,11 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.set $4 + local.tee $5 + local.set $1 loop $while-continue|0 local.get $0 - local.get $6 + local.get $4 i32.lt_u if block $while-break|0 @@ -2494,14 +2494,14 @@ i32.and if local.get $0 - local.get $6 + local.get $4 i32.eq br_if $while-break|0 local.get $0 i32.load8_u i32.const 63 i32.and - local.set $5 + local.set $6 local.get $0 i32.const 1 i32.add @@ -2512,18 +2512,18 @@ i32.const 192 i32.eq if - local.get $4 + local.get $1 + local.get $6 local.get $3 i32.const 31 i32.and i32.const 6 i32.shl - local.get $5 i32.or i32.store16 else local.get $0 - local.get $6 + local.get $4 i32.eq br_if $while-break|0 local.get $0 @@ -2541,21 +2541,21 @@ i32.const 224 i32.eq if + local.get $7 local.get $3 i32.const 15 i32.and i32.const 12 i32.shl - local.get $5 + local.get $6 i32.const 6 i32.shl i32.or - local.get $7 i32.or local.set $3 else local.get $0 - local.get $6 + local.get $4 i32.eq br_if $while-break|0 local.get $0 @@ -2567,7 +2567,7 @@ i32.and i32.const 18 i32.shl - local.get $5 + local.get $6 i32.const 12 i32.shl i32.or @@ -2586,11 +2586,11 @@ i32.const 65536 i32.lt_u if - local.get $4 + local.get $1 local.get $3 i32.store16 else - local.get $4 + local.get $1 local.get $3 i32.const 65536 i32.sub @@ -2608,41 +2608,41 @@ i32.shl i32.or i32.store - local.get $4 + local.get $1 i32.const 2 i32.add - local.set $4 + local.set $1 end end else + local.get $2 local.get $3 i32.eqz - local.get $2 i32.and br_if $while-break|0 - local.get $4 + local.get $1 local.get $3 i32.store16 end - local.get $4 + local.get $1 i32.const 2 i32.add - local.set $4 + local.set $1 br $while-continue|0 end end end call $~lib/rt/tlsf/maybeInitialize - local.get $1 + local.get $5 i32.const 16 i32.sub local.set $0 - local.get $1 + local.get $5 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $1 + local.get $5 select if (result i32) local.get $0 @@ -2672,8 +2672,8 @@ unreachable end local.get $0 - local.get $4 local.get $1 + local.get $5 i32.sub call $~lib/rt/tlsf/reallocateBlock i32.const 16 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 65842e1998..bd8abab68c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1465,9 +1465,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -1475,14 +1475,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -1491,18 +1491,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1514,9 +1514,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -1533,7 +1533,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1541,9 +1541,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1555,11 +1555,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1569,25 +1569,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -7185,13 +7185,13 @@ global.get $std/string/str local.set $12 i32.const 1616 - local.tee $0 + local.tee $1 i32.eqz if i32.const 1616 call $~lib/rt/pure/__release i32.const 1648 - local.set $0 + local.set $1 end block $__inlined_func$~lib/string/String#startsWith i32.const 0 @@ -7203,30 +7203,30 @@ i32.lt_s select local.tee $8 - local.get $0 + local.get $1 call $~lib/string/String#get:length - local.tee $1 + local.tee $0 i32.add 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 $12 local.get $8 - local.get $0 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 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 7698cecf1d..f9b982e4fd 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -386,11 +386,11 @@ local.get $3 i32.lt_u if + local.get $1 local.get $0 local.get $2 i32.add i32.load8_u - local.get $1 i32.xor i32.const 16777619 i32.mul @@ -575,89 +575,99 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|0 - local.get $4 + local.get $2 local.get $7 i32.ne if - local.get $4 + local.get $2 + local.set $6 + local.get $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 - local.get $4 + local.get $3 + local.get $6 i32.load i32.store - local.get $2 - local.get $4 + local.get $3 + local.get $6 i32.load offset=4 i32.store offset=4 - local.get $2 - local.get $4 + local.get $3 + local.get $5 + local.get $6 i32.load call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl - local.get $5 i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 - local.get $2 + local.get $6 + local.get $3 i32.store - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 end - local.get $4 + local.get $2 i32.const 12 i32.add - local.set $4 + local.set $2 br $while-continue|0 end end + local.get $5 + local.tee $3 local.get $0 + local.tee $2 i32.load + i32.ne drop - local.get $0 - local.get $5 + local.get $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 + local.get $4 + local.tee $1 + local.get $2 + local.tee $3 i32.load offset=8 + i32.ne drop - local.get $0 local.get $3 + local.get $1 i32.store offset=8 - local.get $0 - local.get $6 + local.get $3 + local.get $8 i32.store offset=12 - local.get $0 - local.get $0 + local.get $3 + local.get $3 i32.load offset=20 i32.store offset=16 ) @@ -841,89 +851,99 @@ i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $8 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $3 + local.set $4 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add local.set $7 - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|0 - local.get $4 + local.get $2 local.get $7 i32.ne if - local.get $4 + local.get $2 + local.set $6 + local.get $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $2 - local.get $4 + local.get $3 + local.get $6 i32.load i32.store - local.get $2 - local.get $4 + local.get $3 + local.get $6 i32.load offset=4 i32.store offset=4 - local.get $2 - local.get $4 + local.get $3 + local.get $5 + local.get $6 i32.load call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $5 i32.add - local.tee $8 + local.tee $6 i32.load i32.store offset=8 - local.get $8 - local.get $2 + local.get $6 + local.get $3 i32.store - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 end - local.get $4 + local.get $2 i32.const 12 i32.add - local.set $4 + local.set $2 br $while-continue|0 end end + local.get $5 + local.tee $3 local.get $0 + local.tee $2 i32.load + i32.ne drop - local.get $0 - local.get $5 + local.get $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $0 + local.get $4 + local.tee $1 + local.get $2 + local.tee $3 i32.load offset=8 + i32.ne drop - local.get $0 local.get $3 + local.get $1 i32.store offset=8 - local.get $0 - local.get $6 + local.get $3 + local.get $8 i32.store offset=12 - local.get $0 - local.get $0 + local.get $3 + local.get $3 i32.load offset=20 i32.store offset=16 ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index b334e3ae07..0d87d01bf5 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,6 +1,6 @@ (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))) @@ -1093,9 +1093,9 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/prepareSize - local.tee $3 - call $~lib/rt/tlsf/searchBlock local.tee $4 + call $~lib/rt/tlsf/searchBlock + local.tee $3 i32.eqz if i32.const 1 @@ -1103,14 +1103,14 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 16 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl i32.const 16 @@ -1119,18 +1119,18 @@ i32.load offset=1568 i32.ne i32.shl + local.get $4 i32.const 1 i32.const 27 - local.get $3 + local.get $4 i32.clz i32.sub i32.shl i32.const 1 i32.sub - local.get $3 i32.add - local.get $3 - local.get $3 + local.get $4 + local.get $4 i32.const 536870904 i32.lt_u select @@ -1142,9 +1142,9 @@ i32.const 16 i32.shr_u local.set $5 - local.get $4 + local.get $3 local.get $5 - local.get $4 + local.get $3 local.get $5 i32.gt_s select @@ -1161,7 +1161,7 @@ end end local.get $0 - local.get $4 + local.get $3 i32.const 16 i32.shl memory.size @@ -1169,9 +1169,9 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $3 + local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $4 + local.tee $3 i32.eqz if i32.const 0 @@ -1183,11 +1183,11 @@ end end end - local.get $4 + local.get $3 i32.load i32.const -4 i32.and - local.get $3 + local.get $4 i32.lt_u if i32.const 0 @@ -1197,25 +1197,25 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.store offset=4 - local.get $4 + local.get $3 local.get $2 i32.store offset=8 - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 - local.get $4 + local.get $3 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $4 local.get $3 - call $~lib/rt/tlsf/prepareBlock local.get $4 + call $~lib/rt/tlsf/prepareBlock + local.get $3 call $~lib/rt/rtrace/onalloc - local.get $4 + local.get $3 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -2860,8 +2860,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 - local.set $4 local.get $0 call $~lib/rt/pure/__retain local.tee $5 @@ -2869,13 +2867,13 @@ local.set $6 local.get $5 i32.load offset=8 - local.set $1 + local.set $4 local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $1 local.get $2 + local.get $4 i32.add local.tee $0 i32.const 0 @@ -2885,43 +2883,43 @@ select else local.get $2 - local.get $1 + local.get $4 local.get $2 - local.get $1 + local.get $4 i32.lt_s select end - local.tee $0 + local.tee $2 local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $1 local.get $3 + 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 else local.get $3 - local.get $1 + local.get $4 local.get $3 - local.get $1 + local.get $4 i32.lt_s select end - local.tee $1 + local.tee $0 i32.lt_s if - local.get $0 + local.get $2 local.get $6 i32.add - local.get $4 local.get $1 local.get $0 + local.get $2 i32.sub call $~lib/memory/memory.fill end @@ -3277,9 +3275,9 @@ call $~lib/rt/pure/__retain i32.store local.get $2 + local.get $0 local.get $3 i32.load offset=4 - local.get $0 i32.add i32.store offset=4 local.get $2 @@ -3360,10 +3358,10 @@ local.get $1 i32.lt_s if + local.get $6 local.get $0 i32.const 2 i32.shl - local.get $6 i32.add local.get $4 i32.store @@ -3503,11 +3501,11 @@ i32.const 0 i32.gt_s select - local.tee $4 + local.tee $2 call $~lib/typedarray/Int32Array#constructor local.tee $3 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.load offset=4 local.get $0 i32.load offset=4 @@ -3515,51 +3513,52 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $2 i32.const 2 i32.shl call $~lib/memory/memory.copy local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $4 ) (func $~lib/typedarray/Int32Array#copyWithin (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 call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $0 + local.tee $4 local.get $3 - local.get $0 + local.get $4 i32.lt_s select local.set $3 - local.get $4 + local.get $5 i32.load offset=4 - local.tee $5 + local.tee $6 local.get $1 i32.const 0 i32.lt_s if (result i32) - local.get $0 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 else local.get $1 - local.get $0 + local.get $4 local.get $1 - local.get $0 + local.get $4 i32.lt_s select end @@ -3567,57 +3566,57 @@ i32.const 2 i32.shl i32.add + local.get $6 local.get $2 i32.const 0 i32.lt_s if (result i32) - local.get $0 local.get $2 + 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 else local.get $2 - local.get $0 + local.get $4 local.get $2 - local.get $0 + local.get $4 i32.lt_s select end - local.tee $2 + local.tee $0 i32.const 2 i32.shl - local.get $5 i32.add local.get $3 i32.const 0 i32.lt_s if (result i32) - local.get $0 local.get $3 + local.get $4 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 $0 + local.get $4 local.get $3 - local.get $0 + local.get $4 i32.lt_s select end - local.get $2 + local.get $0 i32.sub local.tee $2 - local.get $0 + local.get $4 local.get $1 i32.sub local.tee $0 @@ -3628,7 +3627,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $5 ) (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 @@ -4060,124 +4059,6 @@ local.get $0 i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - (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 $4 - 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=8 - local.set $2 - local.get $0 - i32.load offset=4 - local.set $5 - 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.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_s - local.tee $6 - local.get $6 - 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 - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 365 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 367 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -4197,253 +4078,91 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - (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 $4 - 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 + (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $2 - local.get $0 - i32.load offset=4 - local.set $5 - 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.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_u - local.tee $6 - local.get $6 - 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 - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get i32.const 1 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 365 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 408 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 + i32.load offset=4 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 367 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.shl + i32.add + i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - (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/Uint8ClampedArray#constructor - local.tee $4 - 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 + (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $2 - local.get $0 - i32.load offset=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 $5 - i32.add - i32.load8_u - local.tee $6 - local.get $6 - 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 - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 365 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 536 + i32.const 64 call $~lib/builtins/abort unreachable end local.get $0 + i32.load offset=4 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.shl + i32.add + i32.load16_u + ) + (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 367 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 792 + i32.const 64 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + local.get $0 + local.get $0 + i64.mul + ) + (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.ge_u if i32.const 1376 i32.const 1440 - i32.const 408 + i32.const 920 i32.const 64 call $~lib/builtins/abort unreachable @@ -4451,151 +4170,50 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_s + i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/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 + (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 + local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $5 - i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $2 - loop $for-loop|0 - local.get $3 - local.get $5 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_s - local.tee $4 - local.get $4 - i32.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - i32.store16 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $0 - local.get $2 - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $7 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 365 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 + i32.const 1376 + i32.const 1440 + i32.const 1048 + i32.const 64 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 1312 - i32.const 367 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 - call $~lib/rt/pure/__release + local.get $0 + f32.mul ) - (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.ge_u if i32.const 1376 i32.const 1440 - i32.const 536 + i32.const 1176 i32.const 64 call $~lib/builtins/abort unreachable @@ -4603,141 +4221,138 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u + f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + local.get $0 + local.get $0 + f64.mul + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 2 + i32.gt_s + ) + (func $~lib/rt/tlsf/reallocateBlock (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 $8 i32) - 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 $2 + call $~lib/rt/tlsf/prepareSize + local.tee $3 local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__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 - i32.const 1 - i32.shr_u - local.set $5 + i32.const 16 + i32.add local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $5 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $6 + i32.load + local.tee $4 i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $2 - loop $for-loop|0 - local.get $3 + i32.and + if local.get $5 - i32.lt_s + 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 if - i32.const 3 - global.set $~argumentsLength + local.get $0 local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_u - local.tee $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $5 + i32.const 3 + i32.and local.get $4 - i32.mul - local.set $4 + i32.or + i32.store + local.get $1 local.get $2 - local.get $8 - i32.add - local.get $4 - i32.store16 + i32.store offset=12 + local.get $0 + local.get $1 local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return end end local.get $0 local.get $2 - call $~lib/rt/pure/__retain - i32.store - 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 $0 - local.get $7 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 365 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne + 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 8396 + i32.ge_u if - i32.const 0 - i32.const 1312 - i32.const 366 - i32.const 3 - 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 (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 367 - i32.const 3 - 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 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4746,63 +4361,69 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 6 + call $~lib/typedarray/Int8Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#__set + call $~lib/typedarray/Int8Array#__set local.get $1 i32.const 2 i32.const 3 - call $~lib/typedarray/Int32Array#__set + 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 - i32.const 2 - i32.shr_u local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 i32.const 12 - i32.const 8 + i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $4 local.get $5 - i32.const 2 - i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 + 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 $3 + i32.add + i32.load8_s + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $7 local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - i32.load - local.tee $4 - local.get $4 - i32.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - i32.store + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 + if + local.get $2 + local.get $6 + i32.add + local.get $7 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + end local.get $3 i32.const 1 i32.add @@ -4810,53 +4431,78 @@ br $for-loop|0 end end - local.get $0 + 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 $0 + local.get $4 local.get $2 - i32.store offset=4 - local.get $0 - local.get $7 i32.store offset=8 + local.get $4 local.get $0 + i32.store offset=4 + local.get $4 call $~lib/rt/pure/__retain local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 365 + i32.const 392 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 393 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 + call $~lib/typedarray/Int8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 394 i32.const 3 call $~lib/builtins/abort unreachable @@ -4866,30 +4512,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#__get (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 1376 - i32.const 1440 - i32.const 792 - i32.const 64 - call $~lib/builtins/abort - unreachable - end + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=4 - local.get $1 + i32.const 255 + i32.and i32.const 2 - i32.shl - i32.add - i32.load + i32.gt_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -4898,63 +4528,69 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint32Array#__set + 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 - i32.const 2 - i32.shr_u local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 i32.const 12 - i32.const 9 + i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $4 local.get $5 - i32.const 2 - i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 + 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 $3 + i32.add + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $7 local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - i32.load - local.tee $4 - local.get $4 - i32.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - i32.store + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + if + local.get $2 + local.get $6 + i32.add + local.get $7 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + end local.get $3 i32.const 1 i32.add @@ -4962,53 +4598,78 @@ br $for-loop|0 end end - local.get $0 + 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 $0 + local.get $4 local.get $2 - i32.store offset=4 - local.get $0 - local.get $7 i32.store offset=8 + local.get $4 local.get $0 + i32.store offset=4 + local.get $4 call $~lib/rt/pure/__retain local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 3 i32.ne if i32.const 0 i32.const 1312 - i32.const 365 + i32.const 392 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 393 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 394 i32.const 3 call $~lib/builtins/abort unreachable @@ -5018,100 +4679,78 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) - local.get $0 - local.get $0 - i64.mul - ) - (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 920 - i32.const 64 - 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/Int64Array,i64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (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 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.load offset=8 i32.const 3 - i32.shr_u - local.set $5 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.load offset=4 - local.set $6 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.load offset=8 + local.set $5 i32.const 12 - i32.const 10 + i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $4 local.get $5 - i32.const 3 - i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 + 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 $3 + i32.add + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $7 local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - i64.load - local.tee $4 - local.get $4 - i64.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - i64.store + local.get $1 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + if + local.get $2 + local.get $6 + i32.add + local.get $7 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + end local.get $3 i32.const 1 i32.add @@ -5119,53 +4758,78 @@ br $for-loop|0 end end - local.get $0 + 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 $0 + local.get $4 local.get $2 - i32.store offset=4 - local.get $0 - local.get $7 i32.store offset=8 + local.get $4 local.get $0 + i32.store offset=4 + local.get $4 call $~lib/rt/pure/__retain local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 365 + i32.const 392 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 393 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 394 i32.const 3 call $~lib/builtins/abort unreachable @@ -5175,95 +4839,72 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 1376 - i32.const 1440 - i32.const 1048 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 + i32.const 16 i32.shl - i32.add - i64.load + i32.const 16 + i32.shr_s + i32.const 2 + i32.gt_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - (local $0 i32) + (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - 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 + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 + local.set $1 i32.const 12 - i32.const 11 + i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $5 - i32.const 3 + local.set $2 + local.get $1 + i32.const 1 i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 local.get $3 - local.get $5 + local.get $1 i32.lt_s if + local.get $7 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - i64.load - local.tee $4 - local.get $4 - i64.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - i64.store + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + if + local.get $5 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $6 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end local.get $3 i32.const 1 i32.add @@ -5271,156 +4912,184 @@ br $for-loop|0 end end - local.get $0 local.get $2 + local.get $5 + local.get $4 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $2 - i32.store offset=4 local.get $0 - local.get $7 i32.store offset=8 - local.get $0 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne + 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 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 1312 - i32.const 365 + i32.const 390 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne + i32.shr_u + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 391 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne + local.get $1 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 392 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 - local.get $0 - f32.mul - ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $0 - i32.load offset=8 i32.const 2 - i32.shr_u - i32.ge_u + call $~lib/typedarray/Int16Array#__get + i32.const 5 + i32.ne if - i32.const 1376 - i32.const 1440 - i32.const 1176 - i32.const 64 + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 65535 + i32.and i32.const 2 - i32.shl - i32.add - f32.load + i32.gt_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - (local $0 i32) + (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - 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 + local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 + local.set $1 i32.const 12 + i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $5 - i32.const 2 + local.set $2 + local.get $1 + i32.const 1 i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 - loop $for-loop|0 - local.get $3 - local.get $5 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 + loop $for-loop|0 + local.get $3 + local.get $1 i32.lt_s if + local.get $7 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - f32.load - local.tee $4 - local.get $4 - f32.mul - local.set $4 - local.get $2 - local.get $8 - i32.add - local.get $4 - f32.store + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + if + local.get $5 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $6 + i32.store16 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end local.get $3 i32.const 1 i32.add @@ -5428,418 +5097,415 @@ br $for-loop|0 end end - local.get $0 local.get $2 + local.get $5 + local.get $4 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $2 - i32.store offset=4 local.get $0 - local.get $7 i32.store offset=8 - local.get $0 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne + 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 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 1312 - i32.const 365 + i32.const 390 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne + i32.shr_u + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 391 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 392 i32.const 3 call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 394 + i32.const 3 + 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/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.mul + i32.const 2 + i32.gt_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - (local $0 i32) + (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) - 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 + local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 + local.set $4 i32.const 12 - i32.const 13 + i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $5 - i32.const 3 + local.set $2 + local.get $4 + i32.const 2 i32.shl - local.tee $7 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $2 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $6 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $1 + local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $6 - local.get $3 - i32.const 3 + local.get $1 + i32.const 2 i32.shl - local.tee $8 - i32.add - f64.load - local.tee $4 - local.get $4 - f64.mul - local.set $4 - local.get $2 - local.get $8 i32.add - local.get $4 - f64.store - local.get $3 + i32.load + local.set $0 + i32.const 3 + global.set $~argumentsLength + local.get $0 + i32.const 2 + i32.gt_s + if + local.get $5 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + end + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $0 local.get $2 + local.get $5 + local.get $3 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $2 - i32.store offset=4 local.get $0 - local.get $7 i32.store offset=8 - local.get $0 + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne + 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 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 1312 - i32.const 365 + i32.const 390 i32.const 3 call $~lib/builtins/abort unreachable end - 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 1312 + i32.const 391 + i32.const 3 + 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 1312 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 1312 - i32.const 366 + i32.const 393 i32.const 3 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/Int32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 1312 - i32.const 367 + i32.const 394 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 2 - i32.gt_s + i32.gt_u ) - (func $~lib/rt/tlsf/reallocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.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.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - local.get $2 - i32.store offset=12 + 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 $2 + 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 $6 + loop $for-loop|0 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 $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 i32.const 3 - i32.and - local.get $4 - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=12 + global.set $~argumentsLength local.get $0 + i32.const 2 + i32.gt_u + if + local.get $5 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + end local.get $1 - local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - return + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 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 $5 local.get $3 - i32.const 16 - i32.add - local.get $1 - i32.const 16 - i32.add + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 + call $~lib/rt/pure/__retain + i32.store local.get $2 - call $~lib/memory/memory.copy - local.get $1 - i32.const 8396 - 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 (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize local.get $0 - call $~lib/rt/tlsf/checkUsedBlock + i32.store offset=8 + local.get $2 local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) i32.const 6 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 5 i32.const 5 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint32Array#__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 3 - 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 $8 - loop $for-loop|0 - 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 $7 - local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - i32.add - local.get $7 - i32.store8 - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - local.get $6 - local.get $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.store offset=8 - local.get $4 - local.get $2 - i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.tee $0 + call $~lib/typedarray/Uint32Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -5849,8 +5515,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -5861,9 +5529,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 3 i32.ne if @@ -5874,9 +5542,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne if @@ -5887,9 +5555,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if @@ -5900,119 +5568,125 @@ 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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.gt_u + i64.const 2 + i64.gt_s ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - (local $0 i32) + (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $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 $6 i64) local.get $0 - local.set $1 - i32.const 0 - local.set $0 - local.get $1 i32.load offset=8 - local.set $5 + i32.const 3 + i32.shr_u + local.set $4 i32.const 12 - i32.const 4 + i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $4 - local.get $5 + local.set $2 + local.get $4 + i32.const 3 + i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 + local.set $5 + local.get $0 i32.load offset=4 - local.set $8 + local.set $0 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $1 + local.get $4 i32.lt_s if - local.get $3 - local.get $8 + local.get $0 + local.get $1 + i32.const 3 + i32.shl i32.add - i32.load8_u - local.set $7 + i64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + local.get $6 + i64.const 2 + i64.gt_s if - local.get $0 - local.tee $2 - i32.const 1 + local.get $5 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $0 - local.get $2 local.get $6 + i64.store + local.get $3 + i32.const 1 i32.add - local.get $7 - i32.store8 + local.set $3 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 $4 - local.get $6 - local.get $0 + local.get $2 + local.get $5 + local.get $3 + 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 $4 + local.get $2 local.get $0 i32.store offset=8 - local.get $4 local.get $2 + local.get $1 i32.store offset=4 - local.get $4 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (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 + 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 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 @@ -6022,9 +5696,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 3 i32.ne if i32.const 0 @@ -6034,11 +5710,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 1312 @@ -6047,11 +5723,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1312 @@ -6060,11 +5736,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 @@ -6073,112 +5749,125 @@ 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/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + i64.const 2 + i64.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) + (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $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 $6 i64) local.get $0 - local.set $1 - i32.const 0 - local.set $0 - local.get $1 i32.load offset=8 - local.set $5 + i32.const 3 + i32.shr_u + local.set $4 i32.const 12 - i32.const 5 + i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $4 - local.get $5 + local.set $2 + local.get $4 + i32.const 3 + i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 + local.set $5 + local.get $0 i32.load offset=4 - local.set $8 + local.set $0 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $1 + local.get $4 i32.lt_s if - local.get $3 - local.get $8 + local.get $0 + local.get $1 + i32.const 3 + i32.shl i32.add - i32.load8_u - local.set $7 + i64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + local.get $6 + i64.const 2 + i64.gt_u if - local.get $0 - local.tee $2 - i32.const 1 + local.get $5 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $0 - local.get $2 local.get $6 + i64.store + local.get $3 + i32.const 1 i32.add - local.get $7 - i32.store8 + local.set $3 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 $4 - local.get $6 - local.get $0 + local.get $2 + local.get $5 + local.get $3 + 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 $4 + local.get $2 local.get $0 i32.store offset=8 - local.get $4 local.get $2 + local.get $1 i32.store offset=4 - local.get $4 + local.get $2 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + (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 + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 5 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -6188,9 +5877,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 3 i32.ne if i32.const 0 @@ -6200,11 +5891,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 1312 @@ -6213,11 +5904,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1312 @@ -6226,11 +5917,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 @@ -6239,134 +5930,125 @@ 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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.gt_s + f32.const 2 + f32.gt ) - (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $6 f32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.set $5 + local.set $4 + i32.const 12 i32.const 12 - i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $5 - i32.const 1 + local.set $2 + local.get $4 + i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 + local.set $5 local.get $0 i32.load offset=4 - local.set $8 + local.set $0 loop $for-loop|0 + local.get $1 local.get $4 - local.get $5 i32.lt_s if - local.get $8 - local.get $4 - i32.const 1 + local.get $0 + local.get $1 + i32.const 2 i32.shl i32.add - i32.load16_s - local.set $7 + f32.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $4 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $6 + f32.const 2 + f32.gt if - local.get $1 - local.tee $2 - i32.const 1 + local.get $5 + local.get $3 + i32.const 2 + i32.shl i32.add - local.set $1 local.get $6 - local.get $2 + f32.store + local.get $3 i32.const 1 - i32.shl i32.add - local.get $7 - i32.store16 + local.set $3 end - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|0 end end + local.get $2 + local.get $5 local.get $3 - local.get $6 - local.get $1 - i32.const 1 + i32.const 2 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $2 local.get $0 i32.store offset=8 - local.get $3 + 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> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (local $0 i32) (local $1 i32) i32.const 6 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set + f32.const 3 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set + f32.const 4 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Int16Array#__set + f32.const 5 + call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Int16Array#filter - local.tee $0 + call $~lib/typedarray/Float32Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -6376,9 +6058,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.const 3 i32.ne @@ -6390,11 +6072,11 @@ 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 + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne if i32.const 0 i32.const 1312 @@ -6403,11 +6085,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne if i32.const 0 i32.const 1312 @@ -6416,11 +6098,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 1312 @@ -6429,132 +6111,125 @@ 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/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 2 - i32.gt_u + f64.const 2 + f64.gt ) - (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $6 f64) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.set $5 + local.set $4 i32.const 12 - i32.const 7 + i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $5 - i32.const 1 + local.set $2 + local.get $4 + i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 + local.set $5 local.get $0 i32.load offset=4 - local.set $8 + local.set $0 loop $for-loop|0 + local.get $1 local.get $4 - local.get $5 i32.lt_s if - local.get $8 - local.get $4 - i32.const 1 + local.get $0 + local.get $1 + i32.const 3 i32.shl i32.add - i32.load16_u - local.set $7 + f64.load + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $4 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + local.get $6 + f64.const 2 + f64.gt if - local.get $1 - local.tee $2 - i32.const 1 + local.get $5 + local.get $3 + i32.const 3 + i32.shl i32.add - local.set $1 local.get $6 - local.get $2 + f64.store + local.get $3 i32.const 1 - i32.shl i32.add - local.get $7 - i32.store16 + local.set $3 end - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|0 end end + local.get $2 + local.get $5 local.get $3 - local.get $6 - local.get $1 - i32.const 1 + i32.const 3 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $2 local.get $0 i32.store offset=8 - local.get $3 + 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> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) i32.const 6 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set + f64.const 3 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set + f64.const 4 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set + f64.const 5 + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#filter - local.tee $0 + call $~lib/typedarray/Float64Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -6564,9 +6239,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.const 3 i32.ne @@ -6578,11 +6253,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne if i32.const 0 i32.const 1312 @@ -6591,11 +6266,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne if i32.const 0 i32.const 1312 @@ -6604,11 +6279,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 1312 @@ -6617,1154 +6292,740 @@ 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/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 255 + i32.and i32.const 2 - i32.gt_s + i32.eq ) - (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 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 8 - call $~lib/rt/tlsf/__alloc - local.set $2 - 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 $2 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 - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $3 + i32.add + i32.load8_s + local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + 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 - 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 end - local.get $2 local.get $5 - local.get $1 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Int32Array#__set + i32.const 255 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - call $~lib/typedarray/Int32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + 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) + 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 + local.set $2 + br $for-loop|0 + end + end end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $5 ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 65535 + i32.and i32.const 2 - i32.gt_u + i32.eq ) - (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u local.set $4 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $2 - 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 $2 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 - if - local.get $1 - local.tee $0 + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 i32.const 1 + i32.shl i32.add - local.set $1 - local.get $5 + i32.load16_s + local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + 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 - 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 end - local.get $2 local.get $5 - local.get $1 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set + i32.const 65535 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - call $~lib/typedarray/Uint32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + 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) + 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 + local.set $2 + br $for-loop|0 + end + end end + local.get $5 + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 2 + i32.eq + ) + (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + 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) + 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 + local.set $2 + br $for-loop|0 + end + end end - local.get $1 - call $~lib/rt/pure/__release + local.get $5 + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + i32.eqz ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 - i64.gt_s + i64.eq ) - (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 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 10 - call $~lib/rt/tlsf/__alloc - local.set $2 - 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 $2 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 - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.get $6 - i64.store - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 + i64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + 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 + local.set $2 + br $for-loop|0 + end + end + end local.get $5 - local.get $1 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set + i64.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 5 - i64.const 5 - call $~lib/typedarray/Int64Array#__set + f32.const 2 + f32.eq + ) + (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - call $~lib/typedarray/Int64Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 + 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) + 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 + local.set $2 + br $for-loop|0 + end + end end - local.get $1 - call $~lib/rt/pure/__release + local.get $5 + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + f32.const 0 + f32.eq ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.gt_u + f64.const 2 + f64.eq ) - (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 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 $2 - 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 $2 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 - if - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 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) + 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 + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end end - local.get $2 local.get $5 - local.get $1 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 5 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set + f64.const 0 + f64.eq + ) + (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - call $~lib/typedarray/Uint64Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $4 + 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.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 + end + i32.const -1 + local.set $2 end + local.get $2 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 255 + i32.and + i32.const 4 + i32.eq + ) + (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 2 - f32.gt + local.get $2 ) - (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#findIndex (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=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u local.set $4 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $2 - 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/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if - local.get $1 - local.tee $0 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 i32.const 1 + i32.shl i32.add - local.set $1 - local.get $5 + i32.load16_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/Int16Array,i16>|inlined.0 + 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 + local.set $2 end local.get $2 - local.get $5 - local.get $1 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 5 - f32.const 5 - call $~lib/typedarray/Float32Array#__set + i32.const 65535 + i32.and + i32.const 4 + i32.eq + ) + (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - call $~lib/typedarray/Float32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 3 - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.set $4 + 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 + 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 + end + i32.const -1 + local.set $2 end + local.get $2 + ) + (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 + local.set $3 local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $2 ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.gt + i32.const 4 + i32.eq ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 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 13 - call $~lib/rt/tlsf/__alloc - local.set $2 - 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 + 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 - local.get $1 - local.tee $0 - i32.const 1 - i32.add - local.set $1 - local.get $5 - local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 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 $2 - local.get $5 - local.get $1 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $1 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.store offset=8 - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) - i32.const 6 - 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 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 $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 3 - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + local.get $2 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.eq + i64.const 4 + i64.eq ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (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/Int8Array,i8>|inlined.0 + 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 $2 local.get $3 + local.get $2 + i32.const 2 + i32.shl i32.add - i32.load8_s + f32.load local.get $2 local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - end + 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 @@ -7772,47 +7033,47 @@ br $for-loop|0 end end + i32.const -1 + local.set $2 end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.eqz + f32.const 4 + f32.eq ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (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/Uint8Array,u8>|inlined.0 + 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 $2 local.get $3 + local.get $2 + i32.const 3 + i32.shl i32.add - i32.load8_u + f64.load local.get $2 local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - end + 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 @@ -7820,17 +7081,27 @@ br $for-loop|0 end end + i32.const -1 + local.set $2 end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and + f64.const 4 + f64.eq + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 2 - i32.eq + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7840,32 +7111,25 @@ 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 + block $~lib/typedarray/EVERY<~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 - i32.const 1 - i32.shl local.get $3 i32.add - i32.load16_s + i32.load8_s local.get $2 local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - end + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $2 i32.const 1 i32.add @@ -7873,16 +7137,18 @@ br $for-loop|0 end end - end + i32.const 1 + local.set $5 + end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 + i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7892,32 +7158,25 @@ 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 + 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 local.get $2 - i32.const 1 - i32.shl local.get $3 i32.add - i32.load16_u + i32.load8_u local.get $2 local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - end + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 local.get $2 i32.const 1 i32.add @@ -7925,15 +7184,22 @@ br $for-loop|0 end end + i32.const 1 + local.set $5 end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.const 2 - i32.eq + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7943,32 +7209,29 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + 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/Int32Array,i32>|inlined.0 + block $~lib/typedarray/EVERY<~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 2 + i32.const 1 i32.shl - local.get $3 i32.add - i32.load + i32.load16_s local.get $2 local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - end + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $2 i32.const 1 i32.add @@ -7976,19 +7239,12 @@ br $for-loop|0 end end + i32.const 1 + local.set $5 end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 2 - i64.eq - ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7998,32 +7254,29 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + 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/Int64Array,i64>|inlined.0 + block $~lib/typedarray/EVERY<~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 - i32.const 3 + i32.const 1 i32.shl - local.get $3 i32.add - i64.load + i32.load16_u local.get $2 local.get $0 local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - end + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 local.get $2 i32.const 1 i32.add @@ -8031,19 +7284,18 @@ br $for-loop|0 end end + i32.const 1 + local.set $5 end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 2 - f32.eq + i32.const 2 + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8056,29 +7308,26 @@ 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 + block $~lib/typedarray/EVERY<~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 - local.get $3 i32.add - f32.load + i32.load local.get $2 local.get $0 local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - end + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $2 i32.const 1 i32.add @@ -8086,20 +7335,18 @@ br $for-loop|0 end end + i32.const 1 + local.set $5 end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 0 - f32.eq - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 - f64.eq + i64.const 2 + i64.rem_s + i64.eqz ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8112,29 +7359,26 @@ 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 + block $~lib/typedarray/EVERY<~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 - local.get $3 i32.add - f64.load + i64.load local.get $2 local.get $0 local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - if - i32.const 1 - local.set $5 - br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - end + call_indirect (type $i64_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 i32.const 1 i32.add @@ -8142,196 +7386,175 @@ br $for-loop|0 end end + i32.const 1 + local.set $5 end local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 0 - f64.eq + i64.const 2 + i64.rem_u + i64.eqz ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + i32.const 1 + i32.const 0 local.get $0 - i32.load offset=4 - local.set $3 - 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 - 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 - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 23 + i32.shr_u i32.const 255 i32.and - i32.const 4 + local.tee $2 + i32.const 255 i32.eq - ) - (func $~lib/typedarray/Uint8Array#findIndex (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 + select + if + local.get $0 + f32.const 2 + f32.mul + local.tee $0 + local.get $0 + f32.div + return + end + local.get $1 + i32.const -2147483648 + i32.and local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|0 + 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 - 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 + local.get $1 + i32.const 9 + i32.shl + i32.clz + i32.sub + local.tee $2 + i32.sub + i32.shl end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#findIndex (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 - i32.shr_u - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|0 + local.set $1 + loop $while-continue|0 local.get $2 - local.get $4 - i32.lt_s + i32.const 128 + i32.gt_s if - i32.const 3 - global.set $~argumentsLength - local.get $2 + 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.get $3 - 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.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 - i32.const -1 - local.set $2 + 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 - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + f32.const 0 local.get $0 - i32.const 65535 - i32.and - i32.const 4 - i32.eq + f32.mul ) - (func $~lib/typedarray/Uint16Array#findIndex (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/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) 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 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 1 - i32.shl - local.get $3 - 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 - end - i32.const -1 - local.set $2 - end - local.get $2 + call $~lib/math/NativeMathf.mod + f32.const 0 + f32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 local.set $3 @@ -8340,7 +7563,7 @@ i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -8348,17 +7571,18 @@ if i32.const 3 global.set $~argumentsLength + local.get $3 local.get $2 i32.const 2 i32.shl - local.get $3 i32.add - i32.load + f32.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 + call_indirect (type $f32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 i32.const 1 i32.add @@ -8366,77 +7590,185 @@ br $for-loop|0 end end - i32.const -1 - local.set $2 + i32.const 1 + local.set $5 end - local.get $2 + local.get $5 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 4 - i32.eq - ) - (func $~lib/typedarray/Int64Array#findIndex (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 $~lib/math/NativeMath.mod (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 - i32.load offset=8 - i32.const 3 - i32.shr_u + 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 + f64.const 2 + f64.mul + local.tee $0 + local.get $0 + f64.div + return + end + local.get $1 + i64.const 63 + i64.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|0 + 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 - local.get $2 - i32.const 3 - i32.shl - local.get $3 - 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 + 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 -1 - local.set $2 + 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 - local.get $2 + f64.const 0 + local.get $0 + f64.mul ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 4 - i64.eq + call $~lib/math/NativeMath.mod + f64.const 0 + f64.eq ) - (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -8444,17 +7776,18 @@ if i32.const 3 global.set $~argumentsLength + local.get $3 local.get $2 - i32.const 2 + i32.const 3 i32.shl - local.get $3 i32.add - f32.load + f64.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 + call_indirect (type $f64_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 i32.const 1 i32.add @@ -8462,17 +7795,57 @@ br $for-loop|0 end end - i32.const -1 - local.set $2 + i32.const 1 + local.set $5 end - local.get $2 + local.get $5 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - f32.const 4 - f32.eq + i32.const 255 + i32.and + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8481,1119 +7854,1271 @@ 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 + 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 - i32.const 3 - i32.shl - local.get $3 - 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 - 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/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - f64.const 4 - f64.eq + i32.const 65535 + i32.and + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 2 - i32.rem_s - i32.eqz + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (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/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 $3 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) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|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 $5 end - local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount i32.const 1 - i32.and - i32.eqz + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (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/Uint8Array,u8>|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 $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 - 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 $5 end - local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.rem_s - i32.eqz + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) 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 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 1 - i32.shl - local.get $3 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - local.set $5 + i32.const 2704 + local.get $1 + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 0 + i32.const 1312 + i32.const 490 + i32.const 5 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 491 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 492 + i32.const 5 + 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#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (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 + local.get $3 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 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + local.set $5 local.get $2 + local.get $0 local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 1 - i32.shl - local.get $3 - 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 - 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 $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 end - i32.const 1 - local.set $5 end - local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 2 - i32.rem_s - i32.eqz + local.get $3 ) - (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 + i32.const 2812 + 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/EVERY<~lib/typedarray/Int32Array,i32>|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 + local.get $0 + i32.const 2800 + 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 2800 + 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 + 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 2800 + 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 $2 - i32.const 2 - i32.shl - local.get $3 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 end - i32.const 1 - local.set $5 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 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 529 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 7 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 530 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 531 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 532 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/pure/__release local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i64.const 2 - i64.rem_s - i64.eqz + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#every (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (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/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_u + local.set $5 local.get $2 + local.get $0 local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 3 - i32.shl - local.get $3 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.add + local.tee $2 + i32.load8_u + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 end - i32.const 1 - local.set $5 end - local.get $5 - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 2 - i64.rem_u - i64.eqz + local.get $3 ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 1 - i32.const 0 + i32.const 4 local.get $0 - i32.reinterpret_f32 - local.tee $1 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and + i32.load offset=8 local.tee $2 - i32.const 255 - i32.eq + i32.const 4 + local.get $2 + i32.lt_s select - if - local.get $0 - f32.const 2 - f32.mul - local.tee $0 - local.get $0 - f32.div - return - end + local.set $3 local.get $1 - i32.const -2147483648 - i32.and - local.set $4 - block $folding-inner0 + i32.const 0 + i32.lt_s + if (result i32) 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 $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 - 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 - end - end + i32.add + local.tee $1 + i32.const 0 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 + i32.const 0 + i32.gt_s + select + else local.get $1 + local.get $2 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 + i32.lt_s + select end - f32.const 0 + local.set $1 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f32.mul - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 local.get $0 - call $~lib/math/NativeMathf.mod - f32.const 0 - f32.eq + 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/Float32Array#every (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=4 + i32.const 2812 + 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 - 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 + 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 $2 - i32.const 2 - i32.shl - local.get $3 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $0 + i32.const 2800 + 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 2800 + 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 - local.set $5 end - local.get $5 - ) - (func $~lib/math/NativeMath.mod (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - i32.const 1 + local.get $2 + call $~lib/typedarray/Uint8Array#reverse + call $~lib/rt/pure/__release i32.const 0 - local.get $0 - 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 - f64.const 2 - f64.mul - local.tee $0 + local.set $0 + loop $for-loop|1 local.get $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 + i32.lt_s 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 $0 + call $~lib/typedarray/Uint8Array#__get + i32.const 2800 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 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne 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 + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 end - 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 - f64.const 0 - local.get $0 - f64.mul - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (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 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (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 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 3 - i32.shl - local.get $3 - 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 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - local.set $5 + 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 1312 + i32.const 529 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $5 - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 255 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 490 - i32.const 5 + i32.const 530 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - global.get $std/typedarray/forEachCallCount + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 491 - i32.const 5 + i32.const 531 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $2 - global.get $std/typedarray/forEachSelf + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 492 - i32.const 5 + i32.const 532 + i32.const 3 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/Uint8Array#forEach (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + i32.const 4 local.get $0 - i32.load offset=4 + 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.get $0 - i32.load offset=8 - local.set $4 + 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/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 2812 + 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 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 $2 + local.get $0 + i32.const 2800 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $3 + local.get $0 + i32.const 2800 + 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 - i32.load8_u + 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 2800 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 255 + i32.and + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + 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 (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 65535 - i32.and - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and + 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 1312 - i32.const 490 - i32.const 5 + i32.const 529 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - global.get $std/typedarray/forEachCallCount + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 491 - i32.const 5 + i32.const 530 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $2 - global.get $std/typedarray/forEachSelf + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 492 - i32.const 5 + i32.const 531 + i32.const 3 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 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 490 - i32.const 5 + i32.const 532 + i32.const 3 call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - 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 (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#reverse (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 + local.get $3 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $0 + i32.lt_u if - i32.const 3 - global.set $~argumentsLength - local.get $2 - i32.const 2 + local.get $4 + local.get $1 + i32.const 1 i32.shl - local.get $3 i32.add - i32.load + local.tee $2 + i32.load16_s + local.set $5 local.get $2 + local.get $4 local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_none) + 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 $1 i32.const 1 i32.add - local.set $2 + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 br $for-loop|0 end end + local.get $3 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 - i32.const 2704 + 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 - call $~lib/array/Array#__get - i64.extend_i32_s - i64.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 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount - i32.ne - if + local.get $1 i32.const 0 - i32.const 1312 - i32.const 491 - i32.const 5 - 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 + 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 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount + 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 (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> + (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 2812 + 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 - 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 $2 - i32.const 3 + local.get $0 + i32.const 2800 + 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 2800 + 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 - i64.load + local.set $0 + br $for-loop|0 + end + end + local.get $2 + 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 local.get $2 local.get $0 + call $~lib/typedarray/Int16Array#__get + i32.const 2800 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 16 + i32.shl + i32.const 16 + i32.shr_s + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 524 + i32.const 5 + 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 (param $0 f32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + 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 1312 - i32.const 490 - i32.const 5 + i32.const 529 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - global.get $std/typedarray/forEachCallCount + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 1312 - i32.const 491 - i32.const 5 + i32.const 530 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $2 - global.get $std/typedarray/forEachSelf - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 492 - i32.const 5 - 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 (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 - i32.const 2704 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 1312 - i32.const 490 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - global.get $std/typedarray/forEachCallCount + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 1312 - i32.const 491 - i32.const 5 + i32.const 531 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $2 - global.get $std/typedarray/forEachSelf + local.get $0 + i32.const 3 + call $~lib/typedarray/Int16Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 1312 - i32.const 492 - i32.const 5 + i32.const 532 + i32.const 3 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 (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9607,6 +9132,8 @@ local.get $3 i32.load offset=8 i32.const 1 + i32.shr_u + i32.const 1 i32.sub local.set $0 loop $for-loop|0 @@ -9614,22 +9141,26 @@ local.get $0 i32.lt_u if - local.get $1 local.get $4 + local.get $1 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_s + i32.load16_u local.set $5 local.get $2 - local.get $0 local.get $4 + local.get $0 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_s - i32.store8 + i32.load16_u + i32.store16 local.get $2 local.get $5 - i32.store8 + i32.store16 local.get $1 i32.const 1 i32.add @@ -9643,7 +9174,74 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> + (func $~lib/typedarray/Uint16Array#subarray (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 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.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/Uint16Array,u16> (local $0 i32) (local $1 i32) (local $2 i32) @@ -9653,11 +9251,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -9670,21 +9268,17 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.add @@ -9693,7 +9287,7 @@ end end local.get $2 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Uint16Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9704,7 +9298,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -9712,10 +9306,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + i32.const 65535 + i32.and i32.ne if i32.const 0 @@ -9733,14 +9325,13 @@ end end local.get $3 - i32.const 4 i32.const 8 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $1 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Uint16Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.ne if @@ -9753,7 +9344,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.ne if @@ -9766,7 +9357,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.ne if @@ -9779,7 +9370,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne if @@ -9799,7 +9390,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9812,6 +9403,8 @@ local.set $4 local.get $3 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub local.set $0 @@ -9820,22 +9413,26 @@ local.get $0 i32.lt_u if - local.get $1 local.get $4 + local.get $1 + i32.const 2 + i32.shl i32.add local.tee $2 - i32.load8_u + i32.load local.set $5 local.get $2 - local.get $0 local.get $4 + local.get $0 + i32.const 2 + i32.shl i32.add local.tee $2 - i32.load8_u - i32.store8 + i32.load + i32.store local.get $2 local.get $5 - i32.store8 + i32.store local.get $1 i32.const 1 i32.add @@ -9849,86 +9446,25 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> + (local $0 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 $4 i32) + (local $5 i32) + i32.const 2812 + i32.load + local.tee $1 + call $~lib/typedarray/Int32Array#constructor + local.tee $4 + local.set $2 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 $2 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $3 - local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $1 - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - 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 + call $~lib/typedarray/Int32Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 local.get $1 i32.lt_s if @@ -9937,17 +9473,13 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -9956,7 +9488,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 @@ -9967,7 +9499,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -9975,8 +9507,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne if i32.const 0 @@ -9994,13 +9524,14 @@ end end local.get $3 + i32.const 4 i32.const 8 - call $~lib/typedarray/Uint8Array#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/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne if @@ -10013,7 +9544,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne if @@ -10026,7 +9557,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne if @@ -10039,7 +9570,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if @@ -10059,12 +9590,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (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 @@ -10092,35 +9625,39 @@ i32.lt_s select end - local.set $2 + local.set $1 i32.const 12 - i32.const 5 + i32.const 9 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + 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 $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + 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 $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10130,11 +9667,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10147,17 +9684,13 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.add @@ -10166,7 +9699,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 @@ -10177,7 +9710,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10185,8 +9718,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne if i32.const 0 @@ -10205,12 +9736,12 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8ClampedArray#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/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne if @@ -10223,7 +9754,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne if @@ -10236,7 +9767,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne if @@ -10249,7 +9780,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if @@ -10269,12 +9800,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (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 @@ -10282,7 +9813,7 @@ local.set $4 local.get $3 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.const 1 i32.sub @@ -10292,26 +9823,26 @@ local.get $0 i32.lt_u if + local.get $4 local.get $1 - i32.const 1 + i32.const 3 i32.shl - local.get $4 i32.add local.tee $2 - i32.load16_s + i64.load local.set $5 local.get $2 + local.get $4 local.get $0 - i32.const 1 + i32.const 3 i32.shl - local.get $4 i32.add local.tee $2 - i32.load16_s - i32.store16 + i64.load + i64.store local.get $2 local.get $5 - i32.store16 + i64.store local.get $1 i32.const 1 i32.add @@ -10325,13 +9856,13 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (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 @@ -10360,39 +9891,39 @@ i32.lt_s select end - local.set $2 + local.set $1 i32.const 12 - i32.const 6 + i32.const 10 call $~lib/rt/tlsf/__alloc - local.tee $1 + 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 - i32.const 1 + i32.const 3 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 local.get $3 i32.sub - i32.const 1 + 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/Int16Array,i16> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10402,11 +9933,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10419,21 +9950,15 @@ i32.const 2800 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/Int64Array#__set local.get $3 local.get $0 i32.const 2800 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/Int64Array#__set local.get $0 i32.const 1 i32.add @@ -10442,7 +9967,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 @@ -10453,7 +9978,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Int64Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10461,11 +9986,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 1312 @@ -10483,14 +10005,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Int64Array#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/Int64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 @@ -10501,9 +10023,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 @@ -10514,9 +10036,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 @@ -10527,9 +10049,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 @@ -10547,69 +10069,13 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint64Array#subarray (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 - local.get $3 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.shl - local.get $4 - i32.add - local.tee $2 - i32.load16_u - local.set $5 - local.get $2 - local.get $0 - i32.const 1 - i32.shl - local.get $4 - i32.add - local.tee $2 - i32.load16_u - i32.store16 - local.get $2 - local.get $5 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Uint16Array#subarray (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 @@ -10638,39 +10104,39 @@ i32.lt_s select end - local.set $2 + local.set $1 i32.const 12 - i32.const 7 + i32.const 11 call $~lib/rt/tlsf/__alloc - local.tee $1 + 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 - i32.const 1 + i32.const 3 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 local.get $3 i32.sub - i32.const 1 + 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/Uint16Array,u16> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10680,11 +10146,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10697,17 +10163,15 @@ i32.const 2800 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/Uint64Array#__set local.get $3 local.get $0 i32.const 2800 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/Uint64Array#__set local.get $0 i32.const 1 i32.add @@ -10716,7 +10180,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 @@ -10727,7 +10191,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Uint64Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10735,9 +10199,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 1312 @@ -10755,14 +10218,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Uint64Array#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/Uint64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 1312 @@ -10773,9 +10236,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 1312 @@ -10786,9 +10249,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 1312 @@ -10799,9 +10262,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1312 @@ -10819,12 +10282,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (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 @@ -10842,26 +10305,26 @@ local.get $0 i32.lt_u if + local.get $4 local.get $1 i32.const 2 i32.shl - local.get $4 i32.add local.tee $2 - i32.load + f32.load local.set $5 local.get $2 + local.get $4 local.get $0 i32.const 2 i32.shl - local.get $4 i32.add local.tee $2 - i32.load - i32.store + f32.load + f32.store local.get $2 local.get $5 - i32.store + f32.store local.get $1 i32.const 1 i32.add @@ -10875,7 +10338,74 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> + (func $~lib/typedarray/Float32Array#subarray (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 + 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> (local $0 i32) (local $1 i32) (local $2 i32) @@ -10885,11 +10415,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10902,13 +10432,15 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -10917,7 +10449,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 @@ -10928,7 +10460,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Float32Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -10936,7 +10468,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 1312 @@ -10953,16 +10486,15 @@ end end local.get $3 - i32.const 4 i32.const 8 - call $~lib/typedarray/Int32Array#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/Int32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 8 + f32.ne if i32.const 0 i32.const 1312 @@ -10973,9 +10505,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne if i32.const 0 i32.const 1312 @@ -10986,9 +10518,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne if i32.const 0 i32.const 1312 @@ -10999,9 +10531,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 1312 @@ -11019,74 +10551,63 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + (local $5 f64) local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + local.get $3 i32.load offset=8 - i32.const 2 + 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 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 local.get $1 - local.get $2 - i32.lt_s - select + local.get $0 + i32.lt_u + if + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.tee $2 + f64.load + local.set $5 + local.get $2 + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.tee $2 + f64.load + f64.store + local.get $2 + local.get $5 + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end end - local.set $2 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $1 - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select local.get $3 - i32.sub - i32.const 2 - i32.shl - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -11096,11 +10617,11 @@ i32.const 2812 i32.load local.tee $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -11113,13 +10634,15 @@ i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $3 local.get $0 i32.const 2800 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 i32.add @@ -11128,7 +10651,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 @@ -11139,7 +10662,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Float64Array#__get i32.const 2800 local.get $1 i32.const 1 @@ -11147,7 +10670,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 1312 @@ -11164,15 +10688,16 @@ end end local.get $3 + i32.const 4 i32.const 8 - call $~lib/typedarray/Uint32Array#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/Uint32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 8 + f64.ne if i32.const 0 i32.const 1312 @@ -11183,9 +10708,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne if i32.const 0 i32.const 1312 @@ -11196,9 +10721,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne if i32.const 0 i32.const 1312 @@ -11209,9 +10734,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 1312 @@ -11229,1111 +10754,577 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int8Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result 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 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 - i32.lt_u + 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 $1 - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $2 - i64.load - local.set $5 local.get $2 - local.get $0 - i32.const 3 - i32.shl - local.get $4 + local.get $3 i32.add local.tee $2 - i64.load - i64.store + i32.const 0 local.get $2 - local.get $5 - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 + 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 $3 + local.get $2 ) - (func $~lib/typedarray/Int64Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (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 - 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 + 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.get $2 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (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.set $2 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 local.get $1 local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain + call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 + i32.const 2908 i32.load - local.tee $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 + local.tee $0 local.set $2 - local.get $1 - call $~lib/typedarray/Int64Array#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 2800 - 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 2800 local.get $0 + local.get $1 + i32.const 2896 + local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__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/Int64Array#__get - i32.const 2800 - 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 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $3 - i32.const 8 - call $~lib/typedarray/Int64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse - local.tee $0 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 - i32.const 529 + i32.const 557 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 530 + i32.const 558 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne + i32.const -1 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 531 + i32.const 559 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 532 + i32.const 560 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 + i32.const 3 + i32.const 2 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 561 + i32.const 3 + 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 0 - local.get $1 + i32.const 3 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + 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 1312 + i32.const 562 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.set $2 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $1 - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub i32.const 3 - i32.shl - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - 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 2800 - 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 2800 - 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 4 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 563 + i32.const 3 + 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 2800 - 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 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + local.get $0 + i32.const 1 + i32.const 10 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 564 + i32.const 3 + 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 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne + 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 1312 - i32.const 529 + i32.const 565 i32.const 3 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 + i32.const 0 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + if + i32.const 0 + i32.const 1312 + i32.const 567 + i32.const 3 + call $~lib/builtins/abort + unreachable + end i32.const 1 - call $~lib/typedarray/Uint64Array#__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 1312 - i32.const 530 + i32.const 568 i32.const 3 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.const 2 - call $~lib/typedarray/Uint64Array#__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 1312 - i32.const 531 + i32.const 569 i32.const 3 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const 3 + i32.ne if i32.const 0 i32.const 1312 - i32.const 532 + i32.const 570 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#reverse (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#lastIndexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 571 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - local.get $4 - i32.add - local.tee $2 - f32.load - local.set $5 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.get $4 - i32.add - local.tee $2 - f32.load - f32.store - local.get $2 - local.get $5 - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Float32Array#subarray (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 3 + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + 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 1312 + i32.const 572 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.set $2 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $1 - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub + i32.const 3 i32.const 2 - i32.shl - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - 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 2800 - 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 2800 - 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 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 2800 - 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 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $3 - i32.const 8 - call $~lib/typedarray/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 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 529 + i32.const 573 i32.const 3 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 1312 - i32.const 530 + i32.const 574 i32.const 3 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 1312 - i32.const 531 + i32.const 575 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + i32.const 1 + i32.const -11 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 532 + i32.const 576 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#reverse (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 - local.get $3 - i32.load offset=8 + i32.const 4 + i32.const 9 + call $~lib/typedarray/Int8Array#subarray + local.tee $0 i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $2 - f64.load - local.set $5 - local.get $2 - local.get $0 - i32.const 3 - i32.shl - local.get $4 - i32.add - local.tee $2 - f64.load - f64.store - local.get $2 - local.get $5 - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $3 - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 2812 - 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 2800 - 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 2800 - 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 $2 - call $~lib/typedarray/Float64Array#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/Float64Array#__get - i32.const 2800 - 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 1312 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 580 + i32.const 3 + call $~lib/builtins/abort + unreachable end - local.get $3 + local.get $0 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 + call $~lib/typedarray/Int8Array#indexOf if i32.const 0 i32.const 1312 - i32.const 529 + i32.const 581 i32.const 3 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/Float64Array#__get - f64.const 7 - f64.ne + i32.ne if i32.const 0 i32.const 1312 - i32.const 530 + i32.const 582 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + i32.const 9 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 531 + i32.const 583 i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + i32.const 10 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 1312 - i32.const 532 + i32.const 584 i32.const 3 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 + 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 1312 + i32.const 585 + i32.const 3 + 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 1312 + i32.const 586 + i32.const 3 + 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 1312 + i32.const 587 + i32.const 3 + 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/Int8Array#indexOf (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 (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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) i32.const 2908 i32.load local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12346,11 +11337,9 @@ i32.const 2896 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/Uint8Array#__set local.get $1 i32.const 1 i32.add @@ -12625,9 +11614,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 @@ -12743,7 +11731,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (local $0 i32) (local $1 i32) (local $2 i32) @@ -12753,7 +11741,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 @@ -12768,7 +11756,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 @@ -13044,7 +12032,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 @@ -13160,59 +12148,211 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + 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 $0 - local.get $1 - i32.const 2896 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__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 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 $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - if - i32.const 0 - i32.const 1312 - i32.const 557 - i32.const 3 - 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 + local.get $2 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf (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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2896 + 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 $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/Int16Array#indexOf + if + i32.const 0 + i32.const 1312 + i32.const 557 + i32.const 3 + 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 1312 i32.const 558 i32.const 3 @@ -13222,7 +12362,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 @@ -13236,7 +12376,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 @@ -13250,7 +12390,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 @@ -13264,7 +12404,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 @@ -13278,7 +12418,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 @@ -13292,7 +12432,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 @@ -13306,7 +12446,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 @@ -13321,7 +12461,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 1312 @@ -13334,7 +12474,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 @@ -13349,7 +12489,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 @@ -13364,7 +12504,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 @@ -13378,7 +12518,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 @@ -13392,7 +12532,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 @@ -13406,7 +12546,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 @@ -13420,7 +12560,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 @@ -13434,7 +12574,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 @@ -13448,7 +12588,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 @@ -13461,11 +12601,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 @@ -13479,7 +12619,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 1312 @@ -13491,7 +12631,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 @@ -13505,7 +12645,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 @@ -13519,7 +12659,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 @@ -13533,7 +12673,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 @@ -13547,7 +12687,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 @@ -13561,7 +12701,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 @@ -13577,189 +12717,37 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + (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 + i32.const 2908 + 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.const 0 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 + i32.const 2896 + local.get $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__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 $2 - i32.const 1 - i32.shl - local.get $0 - 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 (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 $2 - i32.const 1 - i32.shl - local.get $0 - 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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - 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 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 2896 - 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 $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 @@ -14030,7 +13018,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 @@ -14146,71 +13134,215 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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 2896 - 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 1312 - i32.const 557 - i32.const 3 - 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 1312 - i32.const 558 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const -1 - i32.const 0 - call $~lib/typedarray/Int16Array#indexOf - i32.const -1 - i32.ne + local.get $2 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf (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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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 1312 + i32.const 557 + i32.const 3 + 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 1312 + i32.const 558 + i32.const 3 + 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 i32.const 1312 @@ -14222,7 +13354,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 @@ -14236,7 +13368,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 @@ -14250,7 +13382,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 @@ -14264,7 +13396,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 @@ -14278,7 +13410,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 @@ -14292,7 +13424,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 @@ -14307,7 +13439,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 1312 @@ -14320,7 +13452,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 @@ -14335,7 +13467,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 @@ -14350,7 +13482,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 @@ -14364,7 +13496,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 @@ -14378,7 +13510,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 @@ -14392,7 +13524,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 @@ -14406,7 +13538,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 @@ -14420,7 +13552,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 @@ -14434,7 +13566,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 @@ -14446,12 +13578,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 @@ -14465,7 +13598,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 1312 @@ -14477,7 +13610,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 @@ -14491,7 +13624,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 @@ -14505,7 +13638,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 @@ -14519,7 +13652,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 @@ -14533,7 +13666,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 @@ -14547,7 +13680,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 @@ -14563,181 +13696,35 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> + (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 2908 + 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 2896 + 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 $2 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load - local.get $1 - 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 (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 $2 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load - local.get $1 - 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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 2908 - 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 2896 - 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 @@ -15007,9 +13994,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 @@ -15125,69 +14111,216 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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 2896 - 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 1312 - i32.const 557 - i32.const 3 - 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 1312 - i32.const 558 + local.get $2 + ) + (func $~lib/typedarray/Int64Array#lastIndexOf (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 - 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 + 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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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 1312 + i32.const 557 + i32.const 3 + 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 1312 + i32.const 558 + i32.const 3 + 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 i32.const 0 i32.const 1312 @@ -15197,9 +14330,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 @@ -15211,9 +14344,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 @@ -15225,9 +14358,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 @@ -15239,9 +14372,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 @@ -15253,9 +14386,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 @@ -15267,9 +14400,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 @@ -15283,8 +14416,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 1312 @@ -15296,8 +14429,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 @@ -15311,8 +14444,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 @@ -15326,8 +14459,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 @@ -15339,9 +14472,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 @@ -15353,9 +14486,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 @@ -15367,9 +14500,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 @@ -15381,9 +14514,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 @@ -15395,9 +14528,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 @@ -15409,9 +14542,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 @@ -15424,11 +14557,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 @@ -15440,9 +14573,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 1312 @@ -15452,9 +14585,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 @@ -15466,9 +14599,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 @@ -15480,9 +14613,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 @@ -15494,9 +14627,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 @@ -15508,9 +14641,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 @@ -15522,9 +14655,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 @@ -15540,163 +14673,17 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (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 - 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 $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 $2 - i32.const 3 - i32.shl - local.get $0 - i32.add - i64.load - local.get $1 - 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 (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 $2 - i32.const 3 - i32.shl - local.get $0 - i32.add - i64.load - local.get $1 - 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 (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> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) i32.const 2908 i32.load local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15710,7 +14697,7 @@ local.get $1 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + call $~lib/typedarray/Uint64Array#__set local.get $1 i32.const 1 i32.add @@ -15986,7 +14973,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 @@ -16102,54 +15089,200 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - i32.const 2908 - 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 2896 - 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 + local.get $2 + ) + (func $~lib/typedarray/Float32Array#lastIndexOf (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 + 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.const 1312 + 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 (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> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 2908 + 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 2896 + 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/Float32Array#indexOf + if + i32.const 0 + i32.const 1312 i32.const 557 i32.const 3 call $~lib/builtins/abort 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 @@ -16161,9 +15294,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 @@ -16175,9 +15308,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 @@ -16189,9 +15322,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 @@ -16203,9 +15336,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 @@ -16217,9 +15350,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 @@ -16231,9 +15364,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 @@ -16245,9 +15378,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 @@ -16261,8 +15394,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 1312 @@ -16274,8 +15407,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 @@ -16289,8 +15422,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 @@ -16304,8 +15437,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 @@ -16317,9 +15450,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 @@ -16331,9 +15464,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 @@ -16345,9 +15478,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 @@ -16359,9 +15492,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 @@ -16373,9 +15506,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 @@ -16387,9 +15520,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 @@ -16402,11 +15535,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 @@ -16418,9 +15551,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 1312 @@ -16430,9 +15563,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 @@ -16444,9 +15577,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 @@ -16458,9 +15591,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 @@ -16472,9 +15605,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 @@ -16486,9 +15619,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 @@ -16500,9 +15633,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 @@ -16518,12 +15651,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (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) @@ -16536,7 +15669,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 @@ -16561,15 +15694,15 @@ local.get $3 i32.lt_s if + local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl - local.get $0 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 @@ -16582,19 +15715,19 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (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 @@ -16620,15 +15753,15 @@ i32.const 0 i32.ge_s if + local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl - local.get $0 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 @@ -16641,7 +15774,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -16655,16 +15788,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> + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) (local $2 i32) @@ -16674,7 +15807,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 @@ -16687,8 +15820,8 @@ i32.const 2896 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 @@ -16697,9 +15830,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 1312 @@ -16709,9 +15842,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 @@ -16723,9 +15856,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 @@ -16737,9 +15870,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 @@ -16751,9 +15884,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 @@ -16765,9 +15898,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 @@ -16779,9 +15912,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 @@ -16793,9 +15926,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 @@ -16807,9 +15940,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 @@ -16823,8 +15956,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 1312 @@ -16836,8 +15969,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 @@ -16851,8 +15984,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 @@ -16866,8 +15999,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 @@ -16879,9 +16012,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 @@ -16893,9 +16026,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 @@ -16907,9 +16040,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 @@ -16921,9 +16054,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 @@ -16935,9 +16068,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 @@ -16949,9 +16082,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 @@ -16963,12 +16096,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 @@ -16980,9 +16114,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 1312 @@ -16992,9 +16126,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 @@ -17006,9 +16140,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 @@ -17020,9 +16154,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 @@ -17034,9 +16168,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 @@ -17048,9 +16182,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 @@ -17062,9 +16196,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 @@ -17080,689 +16214,505 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (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 $2 - i32.const 3 - i32.shl - local.get $0 - 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 (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/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/util/number/utoa_simple (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.rem_u + local.set $3 + local.get $1 + i32.const 10 + i32.div_u + local.set $1 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.tee $2 + i32.const 1 + i32.shl + i32.add 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 $2 - i32.const 3 - i32.shl - local.get $0 - 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 (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 + i32.const 48 + i32.add + i32.store16 + local.get $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> - (local $0 i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 2908 - 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 2896 - 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 1312 - i32.const 557 - i32.const 3 - 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 + i32.eqz if - i32.const 0 - i32.const 1312 - i32.const 558 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2944 + return end local.get $0 - f64.const -1 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.const 31 + i32.shr_u + local.tee $1 if i32.const 0 - i32.const 1312 - i32.const 559 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.sub + local.set $0 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 1312 - i32.const 560 - i32.const 3 - 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 2 - 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 1312 - i32.const 561 - i32.const 3 - 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 (param $0 i32) (result i32) 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 1312 - i32.const 562 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + 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 - i32.const 1312 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.sub + local.set $2 end - local.get $0 - f64.const 1 + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s i32.const 10 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.lt_u if - i32.const 0 - i32.const 1312 - i32.const 564 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 - f64.const 1 - i32.const -100 - call $~lib/typedarray/Float64Array#indexOf + local.get $2 + local.get $1 + call $~lib/util/number/utoa_simple + local.get $1 + ) + (func $~lib/string/String#substring (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.ne - if - i32.const 0 - i32.const 1312 - i32.const 565 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.shl + local.tee $4 + local.get $3 + local.get $1 + local.get $3 + local.get $1 + i32.lt_s + select i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + i32.shl + local.tee $1 + i32.sub + local.tee $3 + i32.eqz if - i32.const 0 - i32.const 1312 - i32.const 567 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2928 + return end + i32.const 0 + local.get $4 + local.get $2 i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne + i32.shl + i32.eq + local.get $1 + select if - i32.const 0 - i32.const 1312 - i32.const 568 - i32.const 3 - 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 -1 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 569 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + 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 (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 3 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const 3 - i32.ne + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 1312 - i32.const 570 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2928 + return 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 1312 - i32.const 571 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load8_s + call $~lib/util/number/itoa32 + 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 1312 - i32.const 572 - i32.const 3 - call $~lib/builtins/abort - unreachable + local.get $3 + i32.const 2976 + 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 $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + 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 $2 + i32.add + local.set $2 + local.get $4 + if + local.get $1 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 2976 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $2 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $1 + local.get $2 local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne + local.get $3 + i32.add + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $2 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 1312 - i32.const 573 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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/Int8Array#join (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 1312 - i32.const 574 - i32.const 3 - 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 1312 - i32.const 575 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 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 1312 - i32.const 576 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 4 - i32.const 9 - call $~lib/typedarray/Float64Array#subarray - local.tee $0 - f64.const 3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + local.get $2 + i32.const 4 + i32.ge_u + select if - i32.const 0 - i32.const 1312 - i32.const 580 - i32.const 3 - 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 - f64.const 4 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - if - i32.const 0 - i32.const 1312 - i32.const 581 - i32.const 3 - 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 - 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 1312 - i32.const 582 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + ) + (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - f64.const 9 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + local.get $1 + i32.eq if - i32.const 0 - i32.const 1312 - i32.const 583 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 1 + return 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 1312 - i32.const 584 - i32.const 3 - call $~lib/builtins/abort - unreachable + 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 end - local.get $0 - f64.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + ) + (func $~lib/util/number/utoa32 (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.eqz if - i32.const 0 - i32.const 1312 - i32.const 585 - i32.const 3 - call $~lib/builtins/abort - unreachable + i32.const 2944 + 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 1312 - i32.const 586 - i32.const 3 - 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 1312 - i32.const 587 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/decimalCount32 (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 (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 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $3 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 2944 - 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 (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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17770,57 +16720,26 @@ 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 255 + i32.and 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 255 + i32.and 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 + i32.const 255 + i32.and local.tee $2 call $~lib/util/number/decimalCount32 - local.get $1 - i32.add local.set $1 local.get $0 local.get $2 @@ -17828,81 +16747,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/string/String#substring (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 2928 - 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 (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17922,18 +16767,18 @@ i32.eqz if local.get $0 - i32.load8_s - call $~lib/util/number/itoa32 + i32.load8_u + call $~lib/util/number/utoa32 return end local.get $3 i32.const 2976 call $~lib/string/String#get:length local.tee $4 - i32.const 11 + i32.const 10 i32.add i32.mul - i32.const 11 + i32.const 10 i32.add local.tee $6 i32.const 1 @@ -17952,8 +16797,8 @@ local.get $0 local.get $5 i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 @@ -17987,8 +16832,8 @@ local.get $0 local.get $3 i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -18003,172 +16848,72 @@ end local.get $1 ) - (func $~lib/typedarray/Int8Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#join (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result 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 - 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 16 + i32.shl + i32.const 16 + i32.shr_s i32.const 0 - ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq + i32.lt_s + local.tee $1 if - 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 + i32.const 45 + i32.store16 + i32.const 0 local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - return - end - i32.const 0 - ) - (func $~lib/util/number/utoa32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 2944 - return + i32.sub + local.set $2 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 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 + i32.const 16 i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 255 - i32.and + 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 255 - i32.and + 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 255 - i32.and + 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 @@ -18176,7 +16921,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -18196,18 +16941,18 @@ i32.eqz if local.get $0 - i32.load8_u - call $~lib/util/number/utoa32 + i32.load16_s + call $~lib/util/number/itoa32 return end local.get $3 i32.const 2976 call $~lib/string/String#get:length local.tee $4 - i32.const 10 + i32.const 11 i32.add i32.mul - i32.const 10 + i32.const 11 i32.add local.tee $6 i32.const 1 @@ -18225,9 +16970,11 @@ local.get $2 local.get $0 local.get $5 + i32.const 1 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i32.load16_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 @@ -18260,9 +17007,11 @@ local.get $2 local.get $0 local.get $3 + i32.const 1 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i32.load16_s + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $0 @@ -18277,14 +17026,16 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#join (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (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 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -18292,57 +17043,26 @@ 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 65535 + i32.and 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 65535 + i32.and 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 + i32.const 65535 + i32.and local.tee $2 call $~lib/util/number/decimalCount32 - local.get $1 - i32.add local.set $1 local.get $0 local.get $2 @@ -18350,7 +17070,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -18370,18 +17090,18 @@ i32.eqz if local.get $0 - i32.load16_s - call $~lib/util/number/itoa32 + i32.load16_u + call $~lib/util/number/utoa32 return end local.get $3 i32.const 2976 call $~lib/string/String#get:length local.tee $4 - i32.const 11 + i32.const 10 i32.add i32.mul - i32.const 11 + i32.const 10 i32.add local.tee $6 i32.const 1 @@ -18402,157 +17122,8 @@ i32.const 1 i32.shl i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $4 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 2976 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - local.set $2 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $1 - local.get $2 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - 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/Int16Array#join (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 (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 (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 2928 - 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 2976 - 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 $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 @@ -20756,14 +19327,14 @@ local.set $1 end i32.const -1 - local.set $2 + local.set $3 end local.get $1 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $2 i32.gt_u if i32.const 1376 @@ -20773,15 +19344,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 0 i32.lt_s if - local.get $2 + local.get $3 i32.const -1 i32.eq if (result i32) - local.get $3 + local.get $2 local.get $1 i32.sub else @@ -20792,12 +19363,12 @@ call $~lib/builtins/abort unreachable end - local.set $2 + local.set $3 else local.get $1 - local.get $2 - i32.add local.get $3 + i32.add + local.get $2 i32.gt_s if i32.const 1040 @@ -20811,19 +19382,19 @@ i32.const 12 i32.const 4 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 local.get $1 i32.add i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain ) (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -20906,16 +19477,16 @@ (local $6 i32) i32.const 4316 i32.load - local.tee $5 + local.tee $4 call $~lib/typedarray/Int8Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 - local.get $5 + local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 4304 local.get $0 @@ -20932,25 +19503,27 @@ 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 - local.set $2 + local.set $0 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $2 + local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $0 + local.tee $1 + local.set $6 + i32.const 0 + local.get $1 i32.gt_u if i32.const 1376 @@ -20963,28 +19536,28 @@ i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $2 + local.tee $1 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $0 + local.get $1 + local.get $6 i32.store offset=8 - local.get $4 - local.get $2 + local.get $1 + local.get $0 i32.store offset=4 - local.get $4 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 loop $for-loop|1 local.get $3 - local.get $5 + local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $3 call $~lib/typedarray/Int8Array#__get - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Int8Array#__get i32.ne @@ -21003,12 +19576,12 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (local $0 i32) @@ -21104,16 +19677,16 @@ (local $6 i32) i32.const 4316 i32.load - local.tee $5 + local.tee $4 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 - local.get $5 + local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 4304 local.get $0 @@ -21128,25 +19701,27 @@ 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 - local.set $2 + local.set $0 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $2 + local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $0 + local.tee $1 + local.set $6 + i32.const 0 + local.get $1 i32.gt_u if i32.const 1376 @@ -21159,28 +19734,28 @@ i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $2 + local.tee $1 + local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $4 - local.get $0 + local.get $1 + local.get $6 i32.store offset=8 - local.get $4 - local.get $2 + local.get $1 + local.get $0 i32.store offset=4 - local.get $4 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 loop $for-loop|1 local.get $3 - local.get $5 + local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne @@ -21199,12 +19774,12 @@ br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (local $0 i32) @@ -23102,11 +21677,11 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 i32.load offset=8 i32.const 3 i32.shr_u - local.get $2 i32.add local.get $0 i32.load offset=8 @@ -23119,9 +21694,9 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - local.get $2 i32.add local.set $0 local.get $1 @@ -23140,10 +21715,10 @@ local.get $0 local.get $3 i32.add + local.get $2 local.get $3 i32.const 3 i32.shl - local.get $2 i32.add i64.load local.tee $4 @@ -23153,6 +21728,7 @@ i32.const -1 i32.xor i64.extend_i32_s + local.get $4 i32.const 255 local.get $4 i32.wrap_i64 @@ -23160,7 +21736,6 @@ i32.const 31 i32.shr_s i64.extend_i32_s - local.get $4 i64.or i64.and i64.store8 @@ -23186,11 +21761,11 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 i32.load offset=8 i32.const 1 i32.shr_u - local.get $2 i32.add local.get $0 i32.load offset=8 @@ -23203,9 +21778,9 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - local.get $2 i32.add local.set $2 local.get $1 @@ -23224,10 +21799,10 @@ local.get $2 local.get $3 i32.add + local.get $4 local.get $3 i32.const 1 i32.shl - local.get $4 i32.add i32.load16_s local.tee $0 @@ -23235,12 +21810,12 @@ i32.shr_s i32.const -1 i32.xor + local.get $0 i32.const 255 local.get $0 i32.sub i32.const 31 i32.shr_s - local.get $0 i32.or i32.and i32.store8 @@ -24537,9 +23112,9 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 i32.load offset=12 - local.get $2 i32.add local.get $0 i32.load offset=8 @@ -26426,55 +25001,55 @@ (local $10 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + 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 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Float32Array#constructor local.tee $1 - local.set $9 - block $folding-inner1 + local.set $7 + block $folding-inner0 i32.const 4380 i32.load local.get $1 @@ -26482,37 +25057,37 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 - local.get $9 + br_if $folding-inner0 + local.get $7 i32.load offset=4 - local.set $9 + local.set $7 i32.const 4372 i32.load local.set $10 i32.const 4380 i32.load - local.set $3 + local.set $8 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $0 + local.get $8 i32.lt_s if - local.get $9 - local.get $2 + local.get $7 + local.get $0 i32.const 2 i32.shl - local.tee $4 + local.tee $2 i32.add - local.get $4 + local.get $2 local.get $10 i32.add i32.load f32.convert_i32_s f32.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -26523,7 +25098,7 @@ i32.const 7616 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 4432 @@ -26539,8 +25114,8 @@ local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 - local.set $2 - local.get $7 + local.set $0 + local.get $5 i32.load offset=8 i32.const 3 i32.shr_u @@ -26551,42 +25126,42 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 24 i32.add - local.set $3 - local.get $7 + local.set $8 + local.get $5 i32.load offset=4 - local.set $4 - local.get $7 + local.set $2 + local.get $5 i32.load offset=8 i32.const 3 i32.shr_u - local.set $6 + local.set $4 loop $for-loop|00 - local.get $2 - local.get $6 + local.get $0 + local.get $4 i32.lt_s if - local.get $3 - local.get $2 + local.get $8 + local.get $0 i32.const 2 i32.shl i32.add - local.get $4 local.get $2 + local.get $0 i32.const 3 i32.shl i32.add i64.load f32.convert_i64_s f32.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|00 end end @@ -26597,31 +25172,33 @@ i32.const 7792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $5 + i32.const 0 + local.set $0 + 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-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 - local.set $3 - local.get $5 + local.set $2 + local.get $3 i32.load offset=4 local.set $4 - local.get $5 + local.get $3 i32.load offset=8 - local.set $6 - loop $for-loop|001 + local.set $9 + loop $for-loop|01 local.get $0 - local.get $6 + local.get $9 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 2 i32.shl @@ -26636,12 +25213,12 @@ i32.const 1 i32.add local.set $0 - br $for-loop|001 + br $for-loop|01 end end i32.const 0 local.set $0 - local.get $8 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u @@ -26652,26 +25229,26 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 16 i32.add - local.set $3 - local.get $8 + local.set $2 + local.get $6 i32.load offset=4 local.set $4 - local.get $8 + local.get $6 i32.load offset=8 i32.const 1 i32.shr_u - local.set $6 + local.set $9 loop $for-loop|02 local.get $0 - local.get $6 + local.get $9 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 2 i32.shl @@ -26702,24 +25279,24 @@ i32.const 2 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 28 i32.add - local.set $3 + local.set $2 i32.const 4580 i32.load local.set $4 i32.const 4588 i32.load - local.set $6 - loop $for-loop|01 + local.set $9 + loop $for-loop|03 local.get $0 - local.get $6 + local.get $9 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 2 i32.shl @@ -26734,7 +25311,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|01 + br $for-loop|03 end end local.get $1 @@ -26748,19 +25325,19 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $0 call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $8 + 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 + local.get $7 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $2 + local.get $8 call $~lib/rt/pure/__release return end @@ -26847,7 +25424,6 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $7 @@ -26864,19 +25440,19 @@ call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -26896,17 +25472,17 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Float64Array#constructor - local.tee $2 + local.tee $1 local.set $9 - block $folding-inner1 + block $folding-inner0 i32.const 4380 i32.load - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 + br_if $folding-inner0 local.get $9 i32.load offset=4 local.set $9 @@ -26915,10 +25491,10 @@ local.set $10 i32.const 4380 i32.load - local.set $3 + local.set $4 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $9 @@ -26941,7 +25517,7 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.const 10 i32.const 3 i32.const 20 @@ -26956,26 +25532,26 @@ i32.load i32.const 3 i32.add - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 - local.get $2 + br_if $folding-inner0 + local.get $1 i32.load offset=4 i32.const 24 i32.add local.set $10 i32.const 4436 i32.load - local.set $3 + local.set $4 i32.const 4444 i32.load - local.set $4 + local.set $2 loop $for-loop|00 local.get $0 - local.get $4 + local.get $2 i32.lt_s if local.get $10 @@ -26983,7 +25559,7 @@ i32.const 3 i32.shl i32.add - local.get $3 + local.get $4 local.get $0 i32.const 2 i32.shl @@ -26998,7 +25574,7 @@ br $for-loop|00 end end - local.get $2 + local.get $1 i32.const 10 i32.const 3 i32.const 20 @@ -27015,38 +25591,38 @@ i32.shr_u i32.const 6 i32.add - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s - br_if $folding-inner1 - local.get $2 + br_if $folding-inner0 + local.get $1 i32.load offset=4 i32.const 48 i32.add - local.set $3 + local.set $4 local.get $7 i32.load offset=4 - local.set $4 + local.set $2 local.get $7 i32.load offset=8 i32.const 3 i32.shr_u - local.set $6 + local.set $5 loop $for-loop|01 local.get $0 - local.get $6 + local.get $5 i32.lt_s if - local.get $3 + local.get $4 local.get $0 i32.const 3 i32.shl - local.tee $11 + local.tee $6 i32.add - local.get $4 - local.get $11 + local.get $2 + local.get $6 i32.add i64.load f64.convert_i64_s @@ -27058,287 +25634,288 @@ br $for-loop|01 end end - local.get $2 + local.get $1 i32.const 10 i32.const 3 i32.const 20 i32.const 8160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - block $folding-inner0 - local.get $5 - i32.load offset=8 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $5 - i32.load offset=4 - local.set $4 - local.get $5 - i32.load offset=8 - local.set $6 - loop $for-loop|02 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $3 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - f64.convert_i32_u - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|02 - end - end - i32.const 0 - local.set $1 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner1 - local.get $2 - i32.load offset=4 - i32.const 32 - i32.add - local.set $3 - local.get $8 - i32.load offset=4 - local.set $4 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|03 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $3 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f64.convert_i32_s - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|03 - end - end - i32.const 0 - local.set $1 - i32.const 4588 - i32.load - i32.const 7 - i32.add - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $2 - i32.load offset=4 - i32.const 56 - i32.add - local.set $3 - i32.const 4580 - i32.load - local.set $4 - i32.const 4588 - i32.load - local.set $6 - loop $for-loop|004 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $3 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_s - f64.convert_i32_s - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|004 - end - end - local.get $2 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 8256 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 - call $~lib/rt/pure/__release - local.get $7 - 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 $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - return - end - end - i32.const 1376 - i32.const 1440 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - ) - (func $start:std/typedarray - (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 $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 f32) - (local $23 f64) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 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 $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.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 95 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 1312 - i32.const 96 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 12 - i32.ne - if i32.const 0 - i32.const 1312 - i32.const 97 + local.set $0 + local.get $3 + i32.load offset=8 + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - if + 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 + loop $for-loop|02 + 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_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end i32.const 0 - i32.const 1312 - i32.const 98 + local.set $0 + 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 - call $~lib/builtins/abort - unreachable - end - local.get $1 + 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 + 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 0 + local.set $0 + i32.const 4588 + 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 4580 + i32.load + local.set $5 + i32.const 4588 + i32.load + local.set $6 + 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 8256 + 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 $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return + end + i32.const 1376 + i32.const 1440 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $start:std/typedarray + (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 $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 f64) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i64) + (local $21 f32) + (local $22 f64) + (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 $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.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 95 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 1312 + i32.const 96 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 97 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 98 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 2 @@ -27508,30 +26085,30 @@ block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 call $~lib/rt/pure/__retain - local.tee $27 + local.tee $28 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $28 + local.tee $29 i32.const 1 i32.le_s br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $27 + local.get $28 i32.load offset=4 local.set $1 - local.get $28 + local.get $29 i32.const 2 i32.eq if local.get $1 f64.load offset=8 - local.set $23 + local.set $22 local.get $1 f64.load local.set $16 i32.const 2 global.set $~argumentsLength - local.get $23 + local.get $22 local.get $16 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 @@ -27541,25 +26118,25 @@ local.get $16 f64.store offset=8 local.get $1 - local.get $23 + local.get $22 f64.store end br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $28 + local.get $29 i32.const 256 i32.lt_s if local.get $1 - local.get $28 + local.get $29 call $~lib/util/sort/insertionSort else local.get $1 - local.get $28 + local.get $29 call $~lib/util/sort/weakHeapSort end end - local.get $27 + local.get $28 call $~lib/rt/pure/__release local.get $0 i32.const 0 @@ -27692,7 +26269,7 @@ i32.const 1504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $29 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27716,7 +26293,7 @@ i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $28 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27740,7 +26317,7 @@ i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $27 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27764,7 +26341,7 @@ i32.const 1648 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $25 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27788,7 +26365,7 @@ i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27852,7 +26429,7 @@ i32.const 1712 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $24 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27870,7 +26447,7 @@ i32.const 1744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $23 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -27883,21 +26460,21 @@ end local.get $1 call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $26 - 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 $21 + local.get $24 call $~lib/rt/pure/__release - local.get $20 + local.get $23 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -27934,7 +26511,7 @@ i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $29 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27958,7 +26535,7 @@ i32.const 1824 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $28 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27982,7 +26559,7 @@ i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28006,7 +26583,7 @@ i32.const 1920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28030,7 +26607,7 @@ i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28096,7 +26673,7 @@ i32.const 2016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28114,7 +26691,7 @@ i32.const 2048 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28127,21 +26704,21 @@ end local.get $1 call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $26 - 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 $21 + local.get $24 call $~lib/rt/pure/__release - local.get $20 + local.get $23 call $~lib/rt/pure/__release i32.const 6 call $~lib/typedarray/Int8Array#constructor @@ -28226,7 +26803,7 @@ i32.const 1 i32.const 5 call $~lib/typedarray/Int8Array#subarray - local.tee $28 + local.tee $29 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -28239,7 +26816,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.load offset=8 i32.const 4 i32.ne @@ -28251,7 +26828,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.ne @@ -28263,7 +26840,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.load offset=8 i32.const 4 i32.ne @@ -28275,11 +26852,11 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#subarray - local.tee $27 + local.tee $28 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -28292,7 +26869,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 i32.load offset=8 i32.const 3 i32.ne @@ -28304,7 +26881,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 3 i32.ne @@ -28316,7 +26893,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 i32.load offset=8 i32.const 3 i32.ne @@ -28332,9 +26909,9 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $28 + local.get $29 call $~lib/rt/pure/__release - local.get $27 + local.get $28 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -28362,7 +26939,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $28 + local.set $29 local.get $1 i32.const 0 i32.const 3 @@ -28375,7 +26952,7 @@ i32.const 2096 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28386,7 +26963,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28398,14 +26975,14 @@ i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $24 + local.tee $26 i32.const 5 i32.const 2 i32.const 15 i32.const 2144 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28416,26 +26993,26 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 + local.set $28 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $28 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 2192 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $19 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -28446,19 +27023,18 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 + local.get $28 call $~lib/rt/pure/__release - local.get $0 + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $28 i32.const 5 i32.const 2 i32.const 15 @@ -28476,7 +27052,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28505,7 +27081,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28534,7 +27110,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28563,7 +27139,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28592,7 +27168,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28621,7 +27197,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28650,7 +27226,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28679,7 +27255,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice @@ -28711,22 +27287,22 @@ end local.get $1 call $~lib/rt/pure/__release - local.get $28 + local.get $29 call $~lib/rt/pure/__release local.get $27 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 $25 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release - local.get $20 + local.get $23 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release local.get $17 @@ -28787,7 +27363,7 @@ i32.const 1 i32.const 4 call $~lib/typedarray/Int32Array#subarray - local.tee $28 + local.tee $29 i32.load offset=8 i32.const 2 i32.shr_u @@ -28801,7 +27377,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne @@ -28813,7 +27389,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.load offset=8 i32.const 12 i32.ne @@ -28891,11 +27467,11 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#slice - local.tee $27 + local.tee $28 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -28908,7 +27484,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 i32.load offset=8 i32.const 2 i32.shr_u @@ -28922,7 +27498,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -28932,7 +27508,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $28 i32.load offset=8 i32.const 4 i32.ne @@ -28949,7 +27525,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.tee $26 + local.tee $27 i32.eq if i32.const 0 @@ -28959,7 +27535,7 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $27 i32.load offset=8 i32.const 2 i32.shr_u @@ -28976,7 +27552,7 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $27 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset @@ -28989,7 +27565,7 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $27 i32.load offset=8 local.get $1 i32.load offset=8 @@ -29004,48 +27580,48 @@ end local.get $1 call $~lib/rt/pure/__release - local.get $28 + local.get $29 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $27 + local.get $28 call $~lib/rt/pure/__release - local.get $26 + local.get $27 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $28 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $28 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $28 + 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 $28 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $27 - local.get $28 + local.set $28 + local.get $29 i32.load offset=8 - local.set $26 + local.set $27 loop $for-loop|0 local.get $0 - local.get $26 + local.get $27 i32.lt_s if i32.const 4 global.set $~argumentsLength local.get $1 local.get $0 - local.get $27 + local.get $28 i32.add i32.load8_s i32.add @@ -29057,3279 +27633,4354 @@ br $for-loop|0 end end - block $folding-inner9 - block $folding-inner14 - block $folding-inner13 - block $folding-inner12 - block $folding-inner11 - 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 $28 - 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 $28 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $28 - 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 $28 - i32.load offset=4 - local.set $27 - local.get $28 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $26 - loop $for-loop|00 - local.get $0 - local.get $26 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - 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 $28 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $28 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $28 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $28 - 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 $28 - i32.load offset=4 - local.set $27 - local.get $28 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $26 - loop $for-loop|01 - local.get $0 - local.get $26 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $27 - 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 $28 - 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 $28 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $27 - loop $for-loop|02 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $28 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $22 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|02 - end - end - local.get $22 - 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 - f64.const 0 - local.set $23 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=4 - local.set $28 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $27 - loop $for-loop|03 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $23 - local.get $28 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $23 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|03 - end - end - local.get $23 - 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 $28 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $28 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $28 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $0 - local.get $28 - i32.load offset=4 - local.set $27 - local.get $28 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|04 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $27 - 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 $28 - 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 $28 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - local.get $28 - i32.load offset=4 - local.set $27 - local.get $28 - 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 $0 - local.get $27 - 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 $28 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $28 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $28 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $28 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - local.get $28 - i32.load offset=4 - local.set $27 - local.get $28 - 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 $0 - local.get $27 - 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 - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $28 - 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 $22 - local.get $1 - i32.load offset=4 - local.set $28 - 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 $22 - local.get $28 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $22 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|07 - end - end - local.get $22 - 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 $23 - local.get $1 - i32.load offset=4 - local.set $28 - 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 $23 - local.get $28 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $23 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|08 - end - end - local.get $23 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $1 - 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 $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-inner2 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner3 - 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-inner2 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner3 - 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-inner4 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner4 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - 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-inner6 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner7 - 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-inner6 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner7 - 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 2704 - 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 2704 - 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 2704 - 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 $28 - local.get $0 - i32.load offset=8 - local.set $27 - loop $for-loop|09 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $28 - 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|09 - end - end - 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/Uint8Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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-inner8 - 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 2704 - 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 2704 - 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 2704 - 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-inner8 - 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 2704 - 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 2704 - 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 2704 - 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 $28 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|010 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $28 - 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|010 - end - end - 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/Uint16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 $28 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|011 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $28 - 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|011 - end - end - 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/Int32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - 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-inner8 - 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 2704 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2704 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 2704 - 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-inner8 - 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 2704 - 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 2704 - 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 2704 - 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-inner8 - 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 2704 - 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 2704 - 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 2704 - 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-inner8 - 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 2704 - 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 2704 - 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 2704 - 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 $28 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $27 - loop $for-loop|012 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $28 - 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|012 - end - end - 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/Float64Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 2704 - 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 2704 - 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 2704 - 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 $28 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $27 - loop $for-loop|013 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $28 - 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|013 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $28 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $28 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 607 - i32.const 3 - 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 $28 - i32.load offset=8 - i32.const 3 - 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/Float64Array,f64>|inlined.0 - local.get $28 - i32.load offset=4 - local.set $24 - loop $while-continue|0 - local.get $1 - local.get $27 - i32.lt_s - if - local.get $24 + block $folding-inner19 + block $folding-inner18 + block $folding-inner0 + block $folding-inner17 + block $folding-inner16 + 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 + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner2 + 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-inner2 + 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-inner2 + 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-inner2 + 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-inner2 + 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-inner2 + 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-inner2 local.get $1 + call $~lib/rt/pure/__release i32.const 3 - i32.shl - i32.add - f64.load - local.tee $23 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) + 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-inner2 + 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-inner2 + 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 + 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-inner2 + 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 + 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-inner2 + 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 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-inner3 + 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-inner3 + 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-inner3 + 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 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-inner3 + 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 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 + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner3 + 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 + block $folding-inner1 + 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 + 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 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 + 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 $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 + 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_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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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.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 $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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|011 + 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 $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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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 + 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 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner6 + 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-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner6 + 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 - else - local.get $23 - local.get $23 + 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 - end - if + br_if $folding-inner4 + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner5 + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner6 + 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-inner7 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + 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 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-inner7 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + 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 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-inner7 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + 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 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-inner7 + local.get $1 + i32.const 53 + call $~lib/typedarray/Int16Array#some + 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 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-inner7 + local.get $1 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + 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 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-inner7 + local.get $1 + i32.const 57 + call $~lib/typedarray/Int32Array#some + 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 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-inner7 + local.get $1 + i32.const 59 + call $~lib/typedarray/Int32Array#some + 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 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-inner7 + local.get $1 + i32.const 61 + call $~lib/typedarray/Int64Array#some + 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 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-inner7 + local.get $1 + i32.const 63 + call $~lib/typedarray/Int64Array#some + 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 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-inner7 + local.get $1 + i32.const 65 + call $~lib/typedarray/Float32Array#some + 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 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-inner7 + local.get $1 + i32.const 67 + call $~lib/typedarray/Float64Array#some + 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 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-inner9 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + 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 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-inner9 + local.get $1 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner10 + 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-inner11 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner12 + 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-inner11 + local.get $1 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner12 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner13 + 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 2704 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2704 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 2704 + 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 2704 + 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 2704 + 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-inner13 + 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 1312 + i32.const 607 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + i32.const 0 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 1312 - i32.const 608 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $27 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $27 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 613 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $27 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $26 - if (result i32) - i32.const 0 - local.get $26 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $27 - i32.load offset=4 - local.set $25 - loop $while-continue|014 - local.get $0 - local.get $26 - i32.lt_s - if - local.get $25 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $22 - f32.const nan:0x400000 - f32.eq - if (result i32) + 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 - else - local.get $22 - local.get $22 - f32.ne - end - if + i32.ne + if + i32.const 0 + i32.const 1312 + i32.const 608 + i32.const 3 + 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 1312 + i32.const 613 + i32.const 3 + 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 1312 + i32.const 614 + i32.const 3 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 + local.get $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 $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $29 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + local.get $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 $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + local.get $0 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + local.get $29 + call $~lib/rt/pure/__release + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner0 + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $29 + i32.const 3008 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner18 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $29 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + 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 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $29 + i32.const 4176 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + 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 1312 + i32.const 691 + i32.const 3 + 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 1312 + i32.const 695 + i32.const 3 + 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 $29 + i32.const 0 + 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 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $28 + i32.const 0 + 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 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $29 + 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 + br_if $folding-inner19 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + local.set $26 + 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 $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 + f32.load + local.tee $21 + local.get $21 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $21 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|026 + end + end + local.get $0 + local.get $28 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.const 0 + 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-inner19 + 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 8352 + 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 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 $25 + i32.const 0 + 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 + 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.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner19 + local.get $0 + i32.load offset=4 + local.set $23 + local.get $1 + i32.load offset=4 + 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 + local.get $23 + local.get $26 + i32.add + i32.const 255 + local.get $19 + local.get $26 + 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 $26 + i32.const 1 + i32.add + 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 + i32.const 21 + i32.const 8384 + 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 + 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 $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|014 + br $folding-inner3 end + i32.const 0 + i32.const 1312 + i32.const 323 + i32.const 3 + call $~lib/builtins/abort + unreachable end - end - local.get $1 - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1312 - i32.const 614 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $28 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner11 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $28 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner11 - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $28 - i32.const 4176 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - 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 $28 - i32.load offset=8 - if - i32.const 0 - i32.const 1312 - i32.const 691 - i32.const 3 - 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 $28 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - if i32.const 0 i32.const 1312 - i32.const 695 + i32.const 344 i32.const 3 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 $28 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $28 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $28 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $27 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $27 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $27 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $27 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $26 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $26 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - i32.const 0 - local.set $0 - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner9 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.add - local.set $25 - local.get $28 - i32.load offset=4 - local.set $21 - local.get $28 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $20 - loop $for-loop|014 - local.get $0 - local.get $20 - i32.lt_s - if - local.get $0 - local.get $25 - i32.add - local.get $21 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $22 - local.get $22 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $22 - 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|014 - end - end - local.get $1 - local.get $27 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - i32.const 0 - local.set $0 - local.get $26 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 8 - i32.add - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner9 - local.get $1 - i32.load offset=4 - i32.const 8 - i32.add - local.set $25 - local.get $26 - i32.load offset=4 - local.set $21 - local.get $26 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $20 - loop $for-loop|015 - local.get $0 - local.get $20 - i32.lt_s - if - local.get $0 - local.get $25 - i32.add - local.get $21 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $24 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $24 - i32.const 255 - local.get $24 - 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|015 - end - end - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 8352 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $21 - 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 $24 i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $24 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $24 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $24 + i32.const 1312 + i32.const 365 i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $25 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $1 - i32.load offset=8 - i32.gt_s - br_if $folding-inner9 - local.get $1 - i32.load offset=4 - local.set $20 - 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 - loop $for-loop|016 - local.get $25 - local.get $18 - i32.lt_s - if - local.get $20 - local.get $25 - i32.add - i32.const 255 - local.get $19 - local.get $25 - 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 $25 - i32.const 1 - i32.add - local.set $25 - br $for-loop|016 - end - end - local.get $1 - local.get $24 - 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 8384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $25 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - return + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 1312 - i32.const 323 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1312 - i32.const 344 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index 9bfed9e314..0be026c881 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -464,17 +464,17 @@ global.get $~lib/math/random_state1_64 local.tee $0 global.set $~lib/math/random_state0_64 + local.get $0 + local.get $1 local.get $1 i64.const 23 i64.shl - local.get $1 i64.xor local.tee $1 local.get $1 i64.const 17 i64.shr_u i64.xor - local.get $0 i64.xor local.get $0 i64.const 26 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index 6daf4f5e61..a6b3c174ca 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1725,61 +1725,61 @@ i32.const 13 i32.add call $~lib/rt/stub/__alloc - local.tee $7 + local.tee $6 i32.const 8 i32.add local.tee $8 i32.const 4 i32.add - local.set $6 - local.get $7 + local.set $7 local.get $6 + local.get $7 i32.store - local.get $6 + local.get $7 i64.const 9071406388179572 i64.store - local.get $7 + local.get $6 i32.const 7 i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $7 + local.get $6 i32.const 1040 i32.const 1040 call $~lib/string/String#get:length - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop local.get $0 - if - local.get $6 + if (result i32) + local.get $7 i32.const 32 i32.store8 - local.get $7 local.get $6 + local.get $7 i32.const 1 i32.add - local.tee $6 - local.get $6 + local.tee $7 + local.get $7 local.get $1 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1788,18 +1788,18 @@ i32.const 1 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $2 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1808,18 +1808,18 @@ i32.const 2 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $3 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1828,18 +1828,18 @@ i32.const 3 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $4 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1848,18 +1848,18 @@ i32.const 4 i32.gt_s if - local.get $7 - local.get $6 local.get $6 + local.get $7 + local.get $7 local.get $5 call $~lib/util/number/dtoa_stream - local.get $6 + local.get $7 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1868,29 +1868,29 @@ end end end - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + else + local.get $7 end - local.get $6 i32.const 10 i32.store8 - local.get $7 + local.get $6 i32.const 1 i32.store offset=4 i32.const 2 - local.get $7 + local.get $6 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $7 + local.get $6 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $7 + local.get $6 select i32.eqz if @@ -1899,7 +1899,7 @@ call $~lib/wasi/index/abort unreachable end - local.get $7 + local.get $6 i32.const 16 i32.sub local.tee $0 @@ -1913,7 +1913,7 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $7 + local.get $6 local.get $0 i32.load i32.add diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 301e42a6d2..9ea9f5e9ae 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1052,6 +1052,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 global.set $while/ran i32.const 10 @@ -1152,18 +1153,16 @@ global.set $while/ran i32.const 0 global.set $while/ran - i32.const 0 - local.set $1 loop $while-continue|01 - local.get $1 + local.get $3 i32.const 1 i32.add - local.tee $1 + local.tee $3 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $1 + local.get $3 i32.const 10 i32.ne if @@ -1177,17 +1176,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $1 + local.set $3 loop $while-continue|002 - local.get $1 + local.get $3 i32.const 1 i32.add - local.tee $1 + local.tee $3 i32.const 10 i32.ne br_if $while-continue|002 end - local.get $1 + local.get $3 i32.const 10 i32.ne if @@ -1213,18 +1212,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $1 - loop $while-continue|04 - local.get $1 + local.set $3 + loop $while-continue|02 + local.get $3 if - local.get $1 + local.get $3 i32.const 1 i32.sub - local.set $1 - br $while-continue|04 + local.set $3 + br $while-continue|02 end end - local.get $1 + local.get $3 if i32.const 0 i32.const 1040 @@ -1284,16 +1283,16 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 + local.set $3 call $while/Ref#constructor local.set $1 - loop $while-continue|02 + loop $while-continue|04 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 @@ -1312,10 +1311,10 @@ end local.get $0 local.set $1 - br $while-continue|02 + br $while-continue|04 end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1352,20 +1351,20 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 + local.set $3 call $while/Ref#constructor local.set $1 loop $while-continue|05 block $while-break|0 call $while/Ref#constructor - local.tee $0 + local.tee $2 call $~lib/rt/pure/__release - local.get $0 + local.get $2 if - local.get $2 + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 10 i32.eq if @@ -1382,7 +1381,7 @@ end end end - local.get $2 + local.get $3 i32.const 10 i32.ne if From 0a35f6139ce04fa729751a08b61380e5b5767298 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 21 Apr 2020 14:30:28 +0300 Subject: [PATCH 32/34] improve --- cli/asc.js | 4 +- tests/compiler/assert-nonnull.optimized.wat | 20 +-- tests/compiler/builtins.optimized.wat | 6 +- tests/compiler/do.optimized.wat | 16 +- tests/compiler/for.optimized.wat | 16 +- tests/compiler/infer-array.optimized.wat | 40 ++--- tests/compiler/instanceof-class.optimized.wat | 7 +- tests/compiler/number.optimized.wat | 85 +++++------ tests/compiler/possibly-null.optimized.wat | 8 +- tests/compiler/resolve-access.optimized.wat | 12 +- tests/compiler/resolve-binary.optimized.wat | 125 ++++++++-------- .../resolve-elementaccess.optimized.wat | 62 ++++---- .../resolve-function-expression.optimized.wat | 6 +- tests/compiler/resolve-nested.optimized.wat | 14 +- .../resolve-propertyaccess.optimized.wat | 6 +- tests/compiler/resolve-unary.optimized.wat | 6 +- tests/compiler/rt/instanceof.optimized.wat | 14 +- tests/compiler/std/array-access.optimized.wat | 6 +- tests/compiler/std/map.optimized.wat | 60 ++++---- .../compiler/std/object-literal.optimized.wat | 23 +-- tests/compiler/std/object.optimized.wat | 6 +- .../std/operator-overloading.optimized.wat | 4 +- tests/compiler/std/pointer.optimized.wat | 2 +- tests/compiler/std/symbol.optimized.wat | 140 +++++++++--------- tests/compiler/typeof.optimized.wat | 6 +- tests/compiler/while.optimized.wat | 12 +- 26 files changed, 356 insertions(+), 350 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 1539fe0f69..436f1fa946 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -709,6 +709,7 @@ exports.main = function main(argv, options, callback) { add("local-cse"); add("reorder-locals"); // differs } + add("optimize-instructions"); if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); add("vacuum"); @@ -719,11 +720,10 @@ exports.main = function main(argv, options, callback) { } add("post-assemblyscript"); } + add("inlining"); // differs add("dce"); add("remove-unused-brs"); add("remove-unused-names"); - add("optimize-instructions"); - add("inlining"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 7422e8e1e5..df78e4aff9 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -137,18 +137,16 @@ local.get $0 ) (func $assert-nonnull/testAll (param $0 i32) (result i32) - (local $1 i32) block $folding-inner0 local.get $0 - local.tee $1 i32.eqz br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/array/Array#__get local.tee $0 - local.get $0 i32.eqz br_if $folding-inner0 + local.get $0 i32.load local.tee $0 i32.eqz @@ -164,18 +162,16 @@ unreachable ) (func $assert-nonnull/testAll2 (param $0 i32) (result i32) - (local $1 i32) block $folding-inner0 local.get $0 - local.tee $1 i32.eqz br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/array/Array#__get local.tee $0 - local.get $0 i32.eqz br_if $folding-inner0 + local.get $0 i32.load local.tee $0 i32.eqz @@ -215,8 +211,8 @@ (local $1 i32) local.get $0 call_indirect (type $none_=>_i32) - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -237,8 +233,8 @@ local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 74821aee7a..6519d8b304 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -111,16 +111,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 89af7877dd..d3ce08b230 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1187,14 +1187,14 @@ global.set $do/ran i32.const 0 local.set $1 - loop $do-continue|03 + loop $do-continue|08 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $do-continue|03 + br_if $do-continue|08 end local.get $1 i32.const 10 @@ -1215,7 +1215,7 @@ local.set $0 i32.const 0 local.set $1 - loop $do-continue|04 + loop $do-continue|03 local.get $0 i32.const 1 i32.add @@ -1232,7 +1232,7 @@ i32.rem_s br_if $do-continue|1 end - br $do-continue|04 + br $do-continue|03 end end local.get $0 @@ -1263,7 +1263,7 @@ global.set $do/ran call $do/Ref#constructor local.set $0 - loop $do-continue|05 + loop $do-continue|04 local.get $2 i32.const 1 i32.add @@ -1286,7 +1286,7 @@ end local.get $1 local.tee $0 - br_if $do-continue|05 + br_if $do-continue|04 end local.get $2 i32.const 10 @@ -1328,7 +1328,7 @@ local.set $2 call $do/Ref#constructor local.set $0 - loop $do-continue|06 + loop $do-continue|05 block $do-break|0 local.get $2 i32.const 1 @@ -1350,7 +1350,7 @@ local.tee $1 call $~lib/rt/pure/__release local.get $1 - br_if $do-continue|06 + br_if $do-continue|05 end end local.get $2 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2a8bdf7dc8..5ffcec178e 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1161,12 +1161,12 @@ global.set $for/ran i32.const 10 local.set $1 - loop $for-loop|03 + loop $for-loop|04 local.get $1 i32.const 1 i32.sub local.tee $1 - br_if $for-loop|03 + br_if $for-loop|04 end local.get $1 if @@ -1183,14 +1183,14 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|05 + loop $for-loop|06 local.get $1 i32.const 1 i32.add local.tee $1 i32.const 10 i32.ne - br_if $for-loop|05 + br_if $for-loop|06 end local.get $1 i32.const 10 @@ -1263,7 +1263,7 @@ global.set $for/ran call $for/Ref#constructor local.set $1 - loop $for-loop|04 + loop $for-loop|03 local.get $1 if local.get $3 @@ -1288,7 +1288,7 @@ end local.get $0 local.set $1 - br $for-loop|04 + br $for-loop|03 end end local.get $3 @@ -1331,7 +1331,7 @@ call $for/Ref#constructor local.set $0 call $~lib/rt/pure/__release - loop $for-loop|06 + loop $for-loop|05 block $for-break0 call $for/Ref#constructor local.tee $1 @@ -1358,7 +1358,7 @@ local.get $0 call $~lib/rt/pure/__release local.set $0 - br $for-loop|06 + br $for-loop|05 end end end diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ddcc193399..9a64104c04 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -288,6 +288,7 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/stub/__alloc @@ -295,27 +296,26 @@ local.get $0 local.get $1 i32.shl - local.tee $1 - local.set $5 - local.get $1 + local.tee $4 + local.set $6 + local.get $4 i32.const 0 call $~lib/rt/stub/__alloc - local.set $4 + local.set $1 local.get $3 if - local.get $4 + local.get $1 local.get $3 - local.get $5 + local.get $6 call $~lib/memory/memory.copy end - local.get $4 - local.tee $3 + local.get $1 i32.store local.get $2 - local.get $3 + local.get $1 i32.store offset=4 local.get $2 - local.get $1 + local.get $4 i32.store offset=8 local.get $2 local.get $0 @@ -340,18 +340,20 @@ i32.const 1184 call $~lib/rt/__allocArray drop + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1232 + call $~lib/rt/__allocArray + local.tee $0 + local.set $1 block $folding-inner0 i32.const 1 - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1232 - call $~lib/rt/__allocArray - local.tee $0 + local.get $0 i32.load offset=12 i32.ge_u br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.load offset=4 i32.const -1 @@ -370,17 +372,17 @@ i32.const 1312 call $~lib/rt/__allocArray drop - i32.const 1 i32.const 3 i32.const 2 i32.const 6 i32.const 1360 call $~lib/rt/__allocArray local.tee $0 + i32.const 1 + local.get $0 i32.load offset=12 i32.ge_u br_if $folding-inner0 - local.get $0 i32.load offset=4 f32.load offset=4 drop diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 0a53353118..e1d5c7c1c4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -92,13 +92,12 @@ i32.const 6 call $~lib/rt/stub/__alloc local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 5 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 global.set $instanceof-class/b block $__inlined_func$instanceof-class/Child~instanceof (result i32) i32.const 0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 86a856737f..4f82c76bb9 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -190,44 +190,45 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - 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 + i32.eqz + if + i32.const 1040 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 0 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 1040 + i32.const 45 + i32.store16 end + local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -287,16 +288,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end @@ -1456,7 +1457,7 @@ i32.const 2544 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1481,7 +1482,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -1494,7 +1495,7 @@ unreachable end i32.const -5 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -1507,7 +1508,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -1524,7 +1525,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2464 call $~lib/string/String.__eq i32.eqz @@ -1541,7 +1542,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1583,7 +1584,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1601,7 +1602,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2464 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index 8a344aa5aa..cb9bd243f8 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/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 0c21077548..5a407f7bb1 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -525,24 +525,24 @@ local.get $0 i64.load i32.wrap_i64 - local.tee $1 + local.tee $0 if - local.get $1 + local.get $0 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.tee $1 + local.get $0 local.get $2 call $~lib/util/number/utoa_simple else i32.const 1184 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 ) (func $~start i32.const 1200 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 3f30383508..05a7f1683e 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -108,16 +108,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end @@ -319,45 +319,46 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - 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/stub/__alloc - local.tee $2 + i32.eqz + if + i32.const 1200 + return + end + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + if + i32.const 0 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 1200 + i32.const 45 + i32.store16 end + local.get $2 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) @@ -1517,7 +1518,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1534,7 +1535,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1551,7 +1552,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1568,7 +1569,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1597,7 +1598,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1614,7 +1615,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1631,7 +1632,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 2512 call $~lib/string/String.__eq i32.eqz @@ -1648,7 +1649,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1665,7 +1666,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1682,7 +1683,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1699,7 +1700,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 2544 call $~lib/string/String.__eq i32.eqz @@ -1716,7 +1717,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1729,7 +1730,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1742,7 +1743,7 @@ unreachable end i32.const -1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2576 call $~lib/string/String.__eq i32.eqz @@ -1755,7 +1756,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1768,7 +1769,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1781,7 +1782,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1806,7 +1807,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2512 call $~lib/string/String.__eq i32.eqz @@ -1819,7 +1820,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1832,7 +1833,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1845,7 +1846,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1858,7 +1859,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1871,7 +1872,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1884,7 +1885,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1897,7 +1898,7 @@ unreachable end i32.const 0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1200 call $~lib/string/String.__eq i32.eqz @@ -1910,7 +1911,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1923,7 +1924,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1264 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index c42f7a7633..ce591da41d 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -289,6 +289,7 @@ ) (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) i32.const 2 i32.const 1073741808 local.get $1 @@ -305,11 +306,11 @@ i32.const 2 local.get $1 i32.shl - local.tee $1 + local.tee $3 i32.const 0 call $~lib/rt/stub/__alloc local.tee $2 - local.get $1 + local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -329,18 +330,22 @@ i32.const 0 i32.store offset=8 local.get $0 + local.tee $1 + local.get $2 + local.tee $0 + local.get $1 i32.load + i32.ne drop local.get $0 - local.get $2 i32.store + local.get $1 local.get $0 - local.get $2 i32.store offset=4 - local.get $0 local.get $1 + local.get $3 i32.store offset=8 - local.get $0 + local.get $1 ) (func $~lib/typedarray/Float32Array#__set (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 @@ -1778,16 +1783,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end @@ -1875,31 +1880,29 @@ i32.add i32.load8_u ) - (func $~lib/number/U8#toString (param $0 i32) (result i32) + (func $~lib/util/number/itoa (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - block $__inlined_func$~lib/util/number/utoa32 (result i32) - i32.const 2624 + i32.const 2624 + local.set $1 + local.get $0 + i32.const 255 + i32.and + local.tee $0 + if local.get $0 - i32.const 255 - i32.and - local.tee $1 - i32.eqz - br_if $__inlined_func$~lib/util/number/utoa32 - drop - local.get $1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $1 + local.tee $1 local.get $0 - call $~lib/util/number/utoa_simple local.get $2 + call $~lib/util/number/utoa_simple end + local.get $1 ) (func $start:resolve-elementaccess (local $0 i32) @@ -2001,14 +2004,13 @@ i32.const 7 call $~lib/rt/stub/__alloc local.tee $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 i32.const 8 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/buf @@ -2023,7 +2025,7 @@ global.get $resolve-elementaccess/buf i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2656 call $~lib/string/String.__eq i32.eqz @@ -2038,7 +2040,7 @@ global.get $resolve-elementaccess/buf i32.const 1 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2688 call $~lib/string/String.__eq i32.eqz @@ -2062,7 +2064,7 @@ local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/number/U8#toString + call $~lib/util/number/itoa i32.const 2720 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 6bb92a3959..c45ef9ad6e 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -172,16 +172,16 @@ local.set $1 local.get $2 if - local.get $3 + local.get $0 i32.load16_u local.tee $2 - local.get $0 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $2 + local.get $4 i32.sub return end diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index e220e7e288..af71cfe8f3 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -85,21 +85,23 @@ ) (func $resolve-nested/Outer.InnerClass#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 4 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 ) (func $resolve-nested/Outer.Inner.EvenInnerClass#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 5 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 ) (func $resolve-nested/Outer.Inner.evenInner (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) nop diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 2297f6e46d..7af7fe8d2b 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -266,16 +266,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 148c781efa..edb2dfa477 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -273,16 +273,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index d433725220..63530bad3b 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -85,21 +85,23 @@ ) (func $rt/instanceof/Animal#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 3 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 ) (func $rt/instanceof/Cat#constructor (param $0 i32) (result i32) local.get $0 - if (result i32) - local.get $0 - else + i32.eqz + if i32.const 4 call $~lib/rt/stub/__alloc + local.set $0 end + local.get $0 call $rt/instanceof/Animal#constructor ) (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 9c9b4de434..0dd0696483 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -135,16 +135,16 @@ local.set $2 local.get $0 if - local.get $3 + local.get $1 i32.load16_u local.tee $0 - local.get $1 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $0 + local.get $4 i32.sub return end diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index cf89502f7c..ad71c47c01 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3309,25 +3309,25 @@ i32.const 6 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 $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -3354,13 +3354,13 @@ i32.load offset=4 i32.add i32.load8_s - local.set $3 + local.set $1 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -3385,17 +3385,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 local.get $3 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -3405,7 +3405,7 @@ br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3598,7 +3598,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -4516,25 +4516,25 @@ i32.const 10 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 $1 + local.get $3 i32.const 0 i32.store offset=12 - local.get $1 + local.get $3 i32.const 0 i32.store offset=16 - local.get $1 + local.get $3 i32.const 0 i32.store offset=20 - local.get $1 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -4561,13 +4561,13 @@ i32.load offset=4 i32.add i32.load8_u - local.set $3 + local.set $1 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $3 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -4592,17 +4592,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 local.get $3 + local.get $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -4612,7 +4612,7 @@ br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4797,7 +4797,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 6139deaace..1ccbff7645 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,6 @@ (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_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))) @@ -151,16 +151,16 @@ local.set $1 local.get $2 if - local.get $3 + local.get $0 i32.load16_u local.tee $2 - local.get $0 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $2 + local.get $4 i32.sub return end @@ -177,7 +177,7 @@ end i32.const 0 ) - (func $~start + (func $start:std/object-literal (local $0 i32) (local $1 i32) i32.const 1136 @@ -207,7 +207,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 1040 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -215,18 +215,18 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $1 + local.get $0 select br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/string/String#get:length - local.tee $0 + local.tee $1 i32.const 1040 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 @@ -279,4 +279,7 @@ unreachable end ) + (func $~start + call $start:std/object-literal + ) ) diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 856757bab1..72bd4a876d 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -122,16 +122,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 6d1b020b39..9474608b1a 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -2075,11 +2075,13 @@ global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 + local.set $1 + local.get $0 i32.load if (result i32) i32.const 0 else - local.get $0 + local.get $1 i32.load offset=4 i32.eqz end diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 28130fa71a..c19a897f7d 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -224,8 +224,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/two global.get $std/pointer/one + global.get $std/pointer/two i32.add global.set $std/pointer/add global.get $std/pointer/add diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index f9b982e4fd..feeceffebf 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -455,16 +455,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end @@ -524,31 +524,31 @@ i32.shl i32.add i32.load - local.set $0 + local.set $1 loop $while-continue|0 - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.load offset=8 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $0 + local.get $1 i32.load i32.const 1040 call $~lib/string/String.__eq end if - local.get $0 + local.get $1 return end - local.get $0 + local.get $1 i32.load offset=8 i32.const -2 i32.and - local.set $0 + local.set $1 br $while-continue|0 end end @@ -565,56 +565,54 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $8 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 + local.set $6 + local.get $2 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.ne if - local.get $2 - local.set $6 - local.get $2 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $3 - local.get $6 + local.get $8 i32.load i32.store local.get $3 - local.get $6 + local.get $8 i32.load offset=4 i32.store offset=4 local.get $3 - local.get $5 - local.get $6 + local.get $4 + local.get $8 i32.load call $~lib/util/hash/hashStr local.get $1 @@ -622,10 +620,10 @@ i32.const 2 i32.shl i32.add - local.tee $6 + local.tee $5 i32.load i32.store offset=8 - local.get $6 + local.get $5 local.get $3 i32.store local.get $3 @@ -633,38 +631,38 @@ i32.add local.set $3 end - local.get $2 + local.get $8 i32.const 12 i32.add - local.set $2 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $3 local.get $0 - local.tee $2 + local.set $3 + local.get $4 + local.tee $0 + local.get $3 i32.load i32.ne drop - local.get $2 local.get $3 + local.get $0 i32.store - local.get $2 + local.get $3 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 local.get $2 - local.tee $3 + local.tee $0 + local.get $3 i32.load offset=8 i32.ne drop local.get $3 - local.get $1 + local.get $0 i32.store offset=8 local.get $3 - local.get $8 + local.get $7 i32.store offset=12 local.get $3 local.get $3 @@ -841,56 +839,54 @@ local.get $1 i32.const 1 i32.add - local.tee $3 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $8 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $2 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $8 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 + local.set $6 + local.get $2 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.ne if - local.get $2 - local.set $6 - local.get $2 + local.get $8 i32.load offset=8 i32.const 1 i32.and i32.eqz if local.get $3 - local.get $6 + local.get $8 i32.load i32.store local.get $3 - local.get $6 + local.get $8 i32.load offset=4 i32.store offset=4 local.get $3 - local.get $5 - local.get $6 + local.get $4 + local.get $8 i32.load call $~lib/util/hash/hash32 local.get $1 @@ -898,10 +894,10 @@ i32.const 2 i32.shl i32.add - local.tee $6 + local.tee $5 i32.load i32.store offset=8 - local.get $6 + local.get $5 local.get $3 i32.store local.get $3 @@ -909,38 +905,38 @@ i32.add local.set $3 end - local.get $2 + local.get $8 i32.const 12 i32.add - local.set $2 + local.set $8 br $while-continue|0 end end - local.get $5 - local.tee $3 local.get $0 - local.tee $2 + local.set $3 + local.get $4 + local.tee $0 + local.get $3 i32.load i32.ne drop - local.get $2 local.get $3 + local.get $0 i32.store - local.get $2 + local.get $3 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 local.get $2 - local.tee $3 + local.tee $0 + local.get $3 i32.load offset=8 i32.ne drop local.get $3 - local.get $1 + local.get $0 i32.store offset=8 local.get $3 - local.get $8 + local.get $7 i32.store offset=12 local.get $3 local.get $3 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index ef8bc54d29..9e7622c6ef 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -75,16 +75,16 @@ local.set $2 local.get $3 if - local.get $0 + local.get $1 i32.load16_u local.tee $3 - local.get $1 + local.get $0 i32.load16_u local.tee $4 i32.ne if - local.get $3 local.get $4 + local.get $3 i32.sub return end diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 9ea9f5e9ae..3336e8bdf4 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1213,14 +1213,14 @@ global.set $while/ran i32.const 10 local.set $3 - loop $while-continue|02 + loop $while-continue|04 local.get $3 if local.get $3 i32.const 1 i32.sub local.set $3 - br $while-continue|02 + br $while-continue|04 end end local.get $3 @@ -1286,7 +1286,7 @@ local.set $3 call $while/Ref#constructor local.set $1 - loop $while-continue|04 + loop $while-continue|05 local.get $1 if local.get $3 @@ -1311,7 +1311,7 @@ end local.get $0 local.set $1 - br $while-continue|04 + br $while-continue|05 end end local.get $3 @@ -1354,7 +1354,7 @@ local.set $3 call $while/Ref#constructor local.set $1 - loop $while-continue|05 + loop $while-continue|06 block $while-break|0 call $while/Ref#constructor local.tee $2 @@ -1377,7 +1377,7 @@ local.set $1 br $while-break|0 end - br $while-continue|05 + br $while-continue|06 end end end From 86b5f6ce23ae6ae4b7a8811012abb7fafbbffc23 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 21 Apr 2020 14:33:17 +0300 Subject: [PATCH 33/34] move optimize-instructions before inlining --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 436f1fa946..a7880ac021 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -709,7 +709,6 @@ exports.main = function main(argv, options, callback) { add("local-cse"); add("reorder-locals"); // differs } - add("optimize-instructions"); if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); add("vacuum"); @@ -720,6 +719,7 @@ exports.main = function main(argv, options, callback) { } add("post-assemblyscript"); } + add("optimize-instructions"); // differs add("inlining"); // differs add("dce"); add("remove-unused-brs"); From a28b0aad2a09985272359c488a2b6647c22de8ac Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 21 Apr 2020 15:10:19 +0300 Subject: [PATCH 34/34] better --- cli/asc.js | 1 + tests/compiler/assert-nonnull.optimized.wat | 14 +- tests/compiler/builtins.optimized.wat | 6 +- tests/compiler/infer-array.optimized.wat | 28 +- tests/compiler/number.optimized.wat | 323 +++++++++--------- tests/compiler/resolve-access.optimized.wat | 209 ++++++------ tests/compiler/resolve-binary.optimized.wat | 265 +++++++------- .../resolve-elementaccess.optimized.wat | 247 +++++++------- .../resolve-function-expression.optimized.wat | 203 ++++++----- tests/compiler/resolve-nested.optimized.wat | 14 +- .../resolve-propertyaccess.optimized.wat | 200 +++++------ tests/compiler/resolve-unary.optimized.wat | 194 +++++------ tests/compiler/rt/instanceof.optimized.wat | 14 +- tests/compiler/std/array-access.optimized.wat | 20 +- tests/compiler/std/map.optimized.wat | 60 ++-- tests/compiler/std/object.optimized.wat | 6 +- .../std/operator-overloading.optimized.wat | 12 +- tests/compiler/std/pointer.optimized.wat | 2 +- tests/compiler/std/symbol.optimized.wat | 170 +++++---- tests/compiler/typeof.optimized.wat | 6 +- tests/compiler/wasi/trace.optimized.wat | 87 ++--- 21 files changed, 1034 insertions(+), 1047 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index a7880ac021..a94d42a69c 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -724,6 +724,7 @@ exports.main = function main(argv, options, callback) { add("dce"); add("remove-unused-brs"); add("remove-unused-names"); + add("inlining-optimizing"); // differs if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index df78e4aff9..c72cde40e7 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -137,6 +137,7 @@ local.get $0 ) (func $assert-nonnull/testAll (param $0 i32) (result i32) + (local $1 i32) block $folding-inner0 local.get $0 i32.eqz @@ -144,9 +145,9 @@ local.get $0 call $~lib/array/Array#__get local.tee $0 + local.get $0 i32.eqz br_if $folding-inner0 - local.get $0 i32.load local.tee $0 i32.eqz @@ -162,6 +163,7 @@ unreachable ) (func $assert-nonnull/testAll2 (param $0 i32) (result i32) + (local $1 i32) block $folding-inner0 local.get $0 i32.eqz @@ -169,9 +171,9 @@ local.get $0 call $~lib/array/Array#__get local.tee $0 + local.get $0 i32.eqz br_if $folding-inner0 - local.get $0 i32.load local.tee $0 i32.eqz @@ -211,8 +213,8 @@ (local $1 i32) local.get $0 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -233,8 +235,8 @@ local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 6519d8b304..74821aee7a 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -111,16 +111,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 9a64104c04..ebe9642e9f 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -288,16 +288,15 @@ (func $~lib/rt/__allocArray (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 16 local.get $2 call $~lib/rt/stub/__alloc - local.tee $2 + local.set $2 local.get $0 local.get $1 i32.shl local.tee $4 - local.set $6 + local.set $5 local.get $4 i32.const 0 call $~lib/rt/stub/__alloc @@ -306,9 +305,10 @@ if local.get $1 local.get $3 - local.get $6 + local.get $5 call $~lib/memory/memory.copy end + local.get $2 local.get $1 i32.store local.get $2 @@ -340,20 +340,18 @@ i32.const 1184 call $~lib/rt/__allocArray drop - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1232 - call $~lib/rt/__allocArray - local.tee $0 - local.set $1 block $folding-inner0 i32.const 1 - local.get $0 + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1232 + call $~lib/rt/__allocArray + local.tee $0 i32.load offset=12 i32.ge_u br_if $folding-inner0 - local.get $1 + local.get $0 i32.load offset=4 i32.load offset=4 i32.const -1 @@ -372,17 +370,17 @@ i32.const 1312 call $~lib/rt/__allocArray drop + i32.const 1 i32.const 3 i32.const 2 i32.const 6 i32.const 1360 call $~lib/rt/__allocArray local.tee $0 - i32.const 1 - local.get $0 i32.load offset=12 i32.ge_u br_if $folding-inner0 + local.get $0 i32.load offset=4 f32.load offset=4 drop diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 4f82c76bb9..00f63c4b32 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -2,12 +2,11 @@ (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) @@ -190,45 +189,44 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 1040 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + if (result i32) 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 + 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 - i32.const 45 - i32.store16 + else + i32.const 1040 end - local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -288,16 +286,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -1270,135 +1268,80 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/util/number/dtoa (result i32) - (local $0 i32) - (local $1 i32) + (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - i32.const 56 - call $~lib/rt/stub/__alloc - local.tee $2 - call $~lib/util/number/dtoa_core + i32.const 0 + local.get $0 + call $~lib/string/String#get:length + local.tee $4 + i32.lt_s + local.set $2 + local.get $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select local.tee $3 - i32.const 28 - i32.eq - if - local.get $2 - return - end - local.get $2 - local.set $0 - 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 $4 - local.get $3 - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - local.tee $3 - local.get $1 - local.get $3 - local.get $1 - i32.lt_s - select - local.tee $3 - local.get $4 - local.get $3 - i32.gt_s - select - i32.const 1 - i32.shl - local.tee $5 - local.get $4 - local.get $3 - local.get $4 - local.get $3 - i32.lt_s - select - i32.const 1 - i32.shl - local.tee $4 - i32.sub - local.tee $3 - i32.eqz - if - i32.const 2272 - local.set $0 - 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 $4 - select - br_if $__inlined_func$~lib/string/String#substring - local.get $3 - call $~lib/rt/stub/__alloc - local.tee $1 - local.get $0 - local.get $4 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $1 - local.set $0 - end - local.get $2 - i32.const 15 - i32.and - i32.eqz + local.get $4 + i32.lt_s + local.set $1 i32.const 0 + local.get $4 local.get $2 select - i32.eqz - if - i32.const 0 - i32.const 2288 - i32.const 70 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + local.tee $2 + local.get $3 + local.get $4 + local.get $1 + select + local.tee $3 local.get $2 - i32.const 16 - i32.sub + local.get $3 + i32.gt_s + select + i32.const 1 + i32.shl local.tee $1 - i32.load offset=4 + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select i32.const 1 - i32.ne + i32.shl + local.tee $2 + i32.sub + local.tee $3 + i32.eqz if - i32.const 0 - i32.const 2288 - i32.const 72 - i32.const 14 - call $~lib/builtins/abort - unreachable + i32.const 2272 + return end - global.get $~lib/rt/stub/offset - local.get $2 + i32.const 0 local.get $1 - i32.load - i32.add + local.get $4 + i32.const 1 + i32.shl i32.eq + local.get $2 + select if - local.get $1 - global.set $~lib/rt/stub/offset + local.get $0 + return end + local.get $3 + call $~lib/rt/stub/__alloc + local.tee $1 local.get $0 + local.get $2 + i32.add + local.get $3 + call $~lib/memory/memory.copy + local.get $1 ) (func $~lib/number/F32.isSafeInteger (param $0 f32) (result i32) local.get $0 @@ -1454,10 +1397,12 @@ ) (func $start:number (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 2544 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1469,7 +1414,61 @@ call $~lib/builtins/abort unreachable end - call $~lib/util/number/dtoa + i32.const 56 + call $~lib/rt/stub/__alloc + local.tee $1 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.ne + if + local.get $1 + local.get $0 + 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 2288 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 2288 + i32.const 72 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $1 + local.get $2 + i32.load + i32.add + i32.eq + if + local.get $2 + global.set $~lib/rt/stub/offset + end + local.set $1 + end + local.get $1 i32.const 2336 call $~lib/string/String.__eq i32.eqz @@ -1482,7 +1481,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2368 call $~lib/string/String.__eq i32.eqz @@ -1495,7 +1494,7 @@ unreachable end i32.const -5 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2400 call $~lib/string/String.__eq i32.eqz @@ -1508,7 +1507,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2432 call $~lib/string/String.__eq i32.eqz @@ -1525,7 +1524,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2464 call $~lib/string/String.__eq i32.eqz @@ -1542,7 +1541,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1579,12 +1578,12 @@ unreachable end global.get $number/a - local.tee $0 + local.tee $1 i32.const 1 i32.add global.set $number/a - local.get $0 - call $~lib/util/number/itoa32 + local.get $1 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -1597,12 +1596,12 @@ unreachable end global.get $number/a - local.tee $0 + local.tee $1 i32.const 1 i32.sub global.set $number/a - local.get $0 - call $~lib/util/number/itoa32 + local.get $1 + call $~lib/number/I32#toString i32.const 2464 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 5a407f7bb1..bd61fa52a9 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -343,112 +343,112 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (param $0 i64) (result i32) - (local $1 i32) + (func $~lib/number/U64#toString (param $0 i64) (result i32) + (local $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i64.eqz - if - i32.const 1184 - 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 $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $3 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - 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 + block $__inlined_func$~lib/util/number/utoa64 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 + i64.eqz + if + i32.const 1184 + local.set $3 + br $__inlined_func$~lib/util/number/utoa64 + end local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $3 - local.set $2 - loop $do-continue|0 + i64.const 4294967295 + i64.le_u + if 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 - i32.sub - local.tee $1 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.tee $4 i32.const 1 i32.shl - i32.add + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.get $2 local.get $4 - i32.const 48 + call $~lib/util/number/utoa_simple + else + 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 - i32.store16 local.get $0 - i64.const 0 - i64.ne - br_if $do-continue|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 $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $3 + local.set $4 + loop $do-continue|0 + local.get $0 + i64.const 10 + i64.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 + 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 end local.get $3 @@ -492,7 +492,7 @@ local.get $0 i32.load offset=4 i64.load - call $~lib/util/number/utoa64 + call $~lib/number/U64#toString ) (func $resolve-access/Container#constructor (result i32) (local $0 i32) @@ -512,7 +512,7 @@ i64.store local.get $0 i64.load - call $~lib/util/number/utoa64 + call $~lib/number/U64#toString ) (func $resolve-access/propertyAccess (result i32) (local $0 i32) @@ -525,24 +525,25 @@ local.get $0 i64.load i32.wrap_i64 - local.tee $0 + local.tee $1 + local.set $0 + i32.const 1184 + local.set $2 + local.get $1 if local.get $0 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $2 + local.get $1 call $~lib/util/number/utoa_simple - else - i32.const 1184 - local.set $1 end - local.get $1 + local.get $2 ) (func $~start i32.const 1200 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 05a7f1683e..95138f9fd1 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -108,16 +108,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -319,46 +319,45 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 1200 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + if (result i32) 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 + 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/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 1200 end - local.get $2 ) (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) @@ -1290,41 +1289,45 @@ i32.const 0 local.get $0 call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 + local.tee $4 i32.lt_s - select - local.tee $3 + local.set $2 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 + local.tee $3 + local.get $4 i32.lt_s + local.set $1 + i32.const 0 + local.get $4 + local.get $2 select - local.tee $1 + local.tee $2 local.get $3 + local.get $4 local.get $1 + select + local.tee $3 + local.get $2 + local.get $3 i32.gt_s select i32.const 1 i32.shl - local.tee $4 + local.tee $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 - local.get $1 i32.lt_s select i32.const 1 i32.shl - local.tee $1 + local.tee $2 i32.sub local.tee $3 i32.eqz @@ -1333,12 +1336,12 @@ return end i32.const 0 + local.get $1 local.get $4 - local.get $2 i32.const 1 i32.shl i32.eq - local.get $1 + local.get $2 select if local.get $0 @@ -1347,15 +1350,15 @@ local.get $3 i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 + local.tee $1 local.get $0 - local.get $1 + local.get $2 i32.add local.get $3 call $~lib/memory/memory.copy - local.get $2 + local.get $1 ) - (func $~lib/util/number/dtoa (result i32) + (func $~lib/number/F64#toString (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1366,54 +1369,54 @@ 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 2432 - i32.const 70 - i32.const 3 - 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 2432 - i32.const 72 - i32.const 14 - 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 + if (result i32) + local.get $0 local.get $1 - global.set $~lib/rt/stub/offset + 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 2432 + i32.const 70 + i32.const 3 + 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 2432 + i32.const 72 + i32.const 14 + 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 + else + local.get $0 end ) (func $start:resolve-binary @@ -1518,7 +1521,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1535,7 +1538,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1552,7 +1555,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1569,7 +1572,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1581,7 +1584,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/util/number/dtoa + call $~lib/number/F64#toString i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -1598,7 +1601,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1615,7 +1618,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1632,7 +1635,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 2512 call $~lib/string/String.__eq i32.eqz @@ -1649,7 +1652,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 1264 call $~lib/string/String.__eq i32.eqz @@ -1666,7 +1669,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1683,7 +1686,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1700,7 +1703,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 2544 call $~lib/string/String.__eq i32.eqz @@ -1717,7 +1720,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 1232 call $~lib/string/String.__eq i32.eqz @@ -1730,7 +1733,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1743,7 +1746,7 @@ unreachable end i32.const -1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2576 call $~lib/string/String.__eq i32.eqz @@ -1756,7 +1759,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1769,7 +1772,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1782,7 +1785,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1794,7 +1797,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/util/number/dtoa + call $~lib/number/F64#toString i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -1807,7 +1810,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2512 call $~lib/string/String.__eq i32.eqz @@ -1820,7 +1823,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1833,7 +1836,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1846,7 +1849,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1859,7 +1862,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 2544 call $~lib/string/String.__eq i32.eqz @@ -1872,7 +1875,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1885,7 +1888,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz @@ -1898,7 +1901,7 @@ unreachable end i32.const 0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1200 call $~lib/string/String.__eq i32.eqz @@ -1911,7 +1914,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1232 call $~lib/string/String.__eq i32.eqz @@ -1924,7 +1927,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1264 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index ce591da41d..0253fb3a25 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -9,7 +9,7 @@ (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 $f64_=>_i32 (func (param f64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -289,7 +289,6 @@ ) (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) i32.const 2 i32.const 1073741808 local.get $1 @@ -306,11 +305,11 @@ i32.const 2 local.get $1 i32.shl - local.tee $3 + local.tee $1 i32.const 0 call $~lib/rt/stub/__alloc local.tee $2 - local.get $3 + local.get $1 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -330,22 +329,18 @@ i32.const 0 i32.store offset=8 local.get $0 - local.tee $1 - local.get $2 - local.tee $0 - local.get $1 i32.load - i32.ne drop local.get $0 + local.get $2 i32.store - local.get $1 local.get $0 + local.get $2 i32.store offset=4 + local.get $0 local.get $1 - local.get $3 i32.store offset=8 - local.get $1 + local.get $0 ) (func $~lib/typedarray/Float32Array#__set (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 @@ -1578,41 +1573,45 @@ i32.const 0 local.get $0 call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 + local.tee $4 i32.lt_s - select - local.tee $3 + local.set $2 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 + local.tee $3 + local.get $4 i32.lt_s + local.set $1 + i32.const 0 + local.get $4 + local.get $2 select - local.tee $1 + local.tee $2 local.get $3 + local.get $4 local.get $1 + select + local.tee $3 + local.get $2 + local.get $3 i32.gt_s select i32.const 1 i32.shl - local.tee $4 + local.tee $1 + local.get $2 local.get $3 - local.get $1 + local.get $2 local.get $3 - local.get $1 i32.lt_s select i32.const 1 i32.shl - local.tee $1 + local.tee $2 i32.sub local.tee $3 i32.eqz @@ -1621,12 +1620,12 @@ return end i32.const 0 + local.get $1 local.get $4 - local.get $2 i32.const 1 i32.shl i32.eq - local.get $1 + local.get $2 select if local.get $0 @@ -1635,103 +1634,110 @@ local.get $3 i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 + local.tee $1 local.get $0 - local.get $1 + local.get $2 i32.add local.get $3 call $~lib/memory/memory.copy - local.get $2 + local.get $1 ) - (func $~lib/util/number/dtoa (param $0 f64) (result i32) + (func $~lib/number/F32#toString (param $0 f32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 1280 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if + (local $4 f64) + block $__inlined_func$~lib/util/number/dtoa local.get $0 - local.get $0 - f64.ne + f64.promote_f32 + local.tee $4 + f64.const 0 + f64.eq if - i32.const 1312 - return + i32.const 1280 + local.set $2 + br $__inlined_func$~lib/util/number/dtoa end - i32.const 1344 - i32.const 1392 - local.get $0 + local.get $4 + local.get $4 + f64.sub f64.const 0 - f64.lt - select - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if + f64.ne + if + local.get $4 + local.get $4 + f64.ne + if + i32.const 1312 + local.set $2 + br $__inlined_func$~lib/util/number/dtoa + end + i32.const 1344 + i32.const 1392 + local.get $4 + f64.const 0 + f64.lt + select + local.set $2 + br $__inlined_func$~lib/util/number/dtoa + end + i32.const 56 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $4 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + br_if $__inlined_func$~lib/util/number/dtoa + local.get $2 local.get $1 - return - end - local.get $1 - 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 2416 - i32.const 70 - i32.const 3 - 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 + call $~lib/string/String#substring + local.get $2 + i32.const 15 + i32.and + i32.eqz i32.const 0 - i32.const 2416 - i32.const 72 - i32.const 14 - 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 $2 + select + i32.eqz + if + i32.const 0 + i32.const 2416 + i32.const 70 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 16 + i32.sub + local.tee $3 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 2416 + i32.const 72 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $2 local.get $3 - global.set $~lib/rt/stub/offset + i32.load + i32.add + i32.eq + if + local.get $3 + global.set $~lib/rt/stub/offset + end + local.set $2 end + local.get $2 ) (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1783,16 +1789,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -1880,7 +1886,7 @@ i32.add i32.load8_u ) - (func $~lib/util/number/itoa (param $0 i32) (result i32) + (func $~lib/number/U8#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 2624 @@ -1925,8 +1931,7 @@ global.get $resolve-elementaccess/arr i32.const 0 call $~lib/typedarray/Float32Array#__get - f64.promote_f32 - call $~lib/util/number/dtoa + call $~lib/number/F32#toString i32.const 2464 call $~lib/string/String.__eq i32.eqz @@ -1941,8 +1946,7 @@ global.get $resolve-elementaccess/arr i32.const 1 call $~lib/typedarray/Float32Array#__get - f64.promote_f32 - call $~lib/util/number/dtoa + call $~lib/number/F32#toString i32.const 2560 call $~lib/string/String.__eq i32.eqz @@ -1966,8 +1970,7 @@ local.get $0 i32.const 0 call $~lib/typedarray/Float32Array#__get - f64.promote_f32 - call $~lib/util/number/dtoa + call $~lib/number/F32#toString i32.const 2592 call $~lib/string/String.__eq i32.eqz @@ -2025,7 +2028,7 @@ global.get $resolve-elementaccess/buf i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2656 call $~lib/string/String.__eq i32.eqz @@ -2040,7 +2043,7 @@ global.get $resolve-elementaccess/buf i32.const 1 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2688 call $~lib/string/String.__eq i32.eqz @@ -2064,7 +2067,7 @@ local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get - call $~lib/util/number/itoa + call $~lib/number/U8#toString i32.const 2720 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index c45ef9ad6e..d13b7b438a 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -2,7 +2,6 @@ (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))) @@ -17,104 +16,6 @@ (func $~setArgumentsLength (param $0 i32) nop ) - (func $~lib/util/number/itoa32 (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 $4 - i32.const 16 - i32.add - local.tee $0 - memory.size - local.tee $2 - i32.const 16 - i32.shl - local.tee $3 - i32.gt_u - if - local.get $2 - local.get $0 - local.get $3 - i32.sub - i32.const 65535 - 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 - end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $4 - 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 1 - i32.store offset=8 - local.get $0 - i32.const 4 - i32.store offset=12 - local.get $4 - local.set $0 - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $2 - local.get $1 - 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 - i32.add - local.get $2 - i32.const 48 - i32.add - i32.store16 - local.get $1 - br_if $do-continue|0 - end - local.get $4 - ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 i32.const 16 @@ -198,15 +99,102 @@ end i32.const 0 ) - (func $~start + (func $start:resolve-function-expression (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) i32.const 1168 global.set $~lib/rt/stub/offset block $__inlined_func$~lib/string/String.__eq (result i32) - i32.const 1 - call $~lib/util/number/itoa32 + i32.const 42 + local.set $2 + i32.const 2 + local.set $5 + i32.const 1184 + local.tee $1 + i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 + i32.shl + local.tee $4 + i32.gt_u + if + local.get $3 + local.get $0 + local.get $4 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $4 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/rt/stub/offset + local.get $1 + 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 1 + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $1 + local.set $3 + loop $do-continue|0 + local.get $2 + i32.const 10 + i32.div_u + local.get $3 + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $2 + br_if $do-continue|0 + end + i32.const 1 + local.get $1 i32.const 1152 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -214,18 +202,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 $2 i32.const 1152 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 br $__inlined_func$~lib/string/String.__eq @@ -242,4 +230,7 @@ unreachable end ) + (func $~start + call $start:resolve-function-expression + ) ) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index af71cfe8f3..e220e7e288 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -85,23 +85,21 @@ ) (func $resolve-nested/Outer.InnerClass#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 4 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $resolve-nested/Outer.Inner.EvenInnerClass#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 5 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $resolve-nested/Outer.Inner.evenInner (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) nop diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 7af7fe8d2b..586d530108 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -105,108 +105,108 @@ i32.store offset=12 local.get $4 ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (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 - i32.const 1040 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.sub - local.set $0 - end - local.get $1 - 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 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $3 - local.set $4 - loop $do-continue|0 + i32.eqz + if + i32.const 1040 + local.set $2 + br $__inlined_func$~lib/util/number/itoa32 + end local.get $0 - i32.const 10 - i32.rem_u - local.set $5 + i32.const 31 + i32.shr_u + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $3 local.get $0 i32.const 10 - i32.div_u - local.set $0 - local.get $4 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 + i32.ge_u i32.const 1 - i32.shl i32.add - local.get $5 - i32.const 48 + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 i32.add - i32.store16 local.get $0 - br_if $do-continue|0 - end - local.get $1 - if + 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 + i32.add + local.tee $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.set $5 + loop $do-continue|0 + local.get $0 + i32.const 10 + i32.div_u + local.get $5 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + 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 $3 - i32.const 45 - i32.store16 + if + local.get $2 + i32.const 45 + i32.store16 + end end - local.get $3 + local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -266,16 +266,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -329,7 +329,7 @@ i32.const 1456 global.set $~lib/rt/stub/offset i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -342,7 +342,7 @@ unreachable end i32.const 11 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1184 call $~lib/string/String.__eq i32.eqz @@ -355,7 +355,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1216 call $~lib/string/String.__eq i32.eqz @@ -368,7 +368,7 @@ unreachable end i32.const 22 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -381,7 +381,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -394,7 +394,7 @@ unreachable end i32.const 33 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1312 call $~lib/string/String.__eq i32.eqz @@ -407,7 +407,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1344 call $~lib/string/String.__eq i32.eqz @@ -420,7 +420,7 @@ unreachable end i32.const 5 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1376 call $~lib/string/String.__eq i32.eqz @@ -433,7 +433,7 @@ unreachable end i32.const 55 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1408 call $~lib/string/String.__eq i32.eqz @@ -453,7 +453,7 @@ i32.store local.get $0 i32.load - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1440 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index edb2dfa477..6d400f4597 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -112,108 +112,108 @@ i32.store offset=12 local.get $4 ) - (func $~lib/util/number/itoa32 (param $0 i32) (result i32) + (func $~lib/number/I32#toString (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 - i32.const 1040 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.sub - local.set $0 - end - local.get $1 - 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 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $3 - local.set $4 - loop $do-continue|0 + i32.eqz + if + i32.const 1040 + local.set $2 + br $__inlined_func$~lib/util/number/itoa32 + end local.get $0 - i32.const 10 - i32.rem_u - local.set $5 + i32.const 31 + i32.shr_u + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $3 local.get $0 i32.const 10 - i32.div_u - local.set $0 - local.get $4 - local.get $2 + i32.ge_u i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl i32.add - local.get $5 - i32.const 48 + local.get $0 + i32.const 10000 + i32.ge_u + i32.const 3 i32.add - i32.store16 local.get $0 - br_if $do-continue|0 - end - local.get $1 - if + 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 + i32.add + local.tee $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.set $5 + loop $do-continue|0 + local.get $0 + i32.const 10 + i32.div_u + local.get $5 + local.get $4 + i32.const 1 + i32.sub + local.tee $4 + 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 $3 - i32.const 45 - i32.store16 + if + local.get $2 + i32.const 45 + i32.store16 + end end - local.get $3 + local.get $2 ) (func $~lib/string/String#get:length (param $0 i32) (result i32) local.get $0 @@ -273,16 +273,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -336,7 +336,7 @@ i32.const 1552 global.set $~lib/rt/stub/offset i32.const -1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq i32.eqz @@ -349,7 +349,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -366,7 +366,7 @@ i32.add global.set $resolve-unary/a global.get $resolve-unary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1184 call $~lib/string/String.__eq i32.eqz @@ -383,7 +383,7 @@ i32.sub global.set $resolve-unary/a global.get $resolve-unary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -428,7 +428,7 @@ global.get $resolve-unary/a i32.const -1 i32.xor - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -446,7 +446,7 @@ i32.add global.set $resolve-unary/b local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1152 call $~lib/string/String.__eq i32.eqz @@ -464,7 +464,7 @@ i32.sub global.set $resolve-unary/b local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1184 call $~lib/string/String.__eq i32.eqz diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 63530bad3b..d433725220 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -85,23 +85,21 @@ ) (func $rt/instanceof/Animal#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 3 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 ) (func $rt/instanceof/Cat#constructor (param $0 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 4 call $~lib/rt/stub/__alloc - local.set $0 end - local.get $0 call $rt/instanceof/Animal#constructor ) (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 0dd0696483..8c4643e1d0 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -37,6 +37,7 @@ i32.add i32.load local.tee $0 + local.get $0 i32.eqz if i32.const 1152 @@ -46,7 +47,6 @@ call $~lib/builtins/abort unreachable end - local.get $0 ) (func $std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32) i32.const 1 @@ -135,16 +135,16 @@ local.set $2 local.get $0 if - local.get $1 + local.get $3 i32.load16_u local.tee $0 - local.get $3 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $0 local.get $4 + local.get $0 i32.sub return end @@ -168,24 +168,26 @@ i32.const 0 local.get $0 call $~lib/string/String#get:length - local.tee $1 + local.tee $2 + i32.lt_s + local.set $1 i32.const 0 + local.get $2 local.get $1 - i32.lt_s select - local.tee $2 + local.tee $1 i32.const 1264 call $~lib/string/String#get:length local.tee $3 i32.add - local.get $1 + local.get $2 i32.gt_s if i32.const 0 return end local.get $0 - local.get $2 + local.get $1 local.get $3 call $~lib/util/string/compareImpl i32.eqz diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ad71c47c01..cf89502f7c 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3309,25 +3309,25 @@ i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 0 i32.store offset=8 - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 - local.get $3 + local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -3354,13 +3354,13 @@ i32.load offset=4 i32.add i32.load8_s - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -3385,17 +3385,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -3405,7 +3405,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -3598,7 +3598,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -4516,25 +4516,25 @@ i32.const 10 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 0 i32.store offset=8 - local.get $3 + local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 - local.get $3 + local.get $1 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $5 @@ -4561,13 +4561,13 @@ i32.load offset=4 i32.add i32.load8_u - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -4592,17 +4592,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -4612,7 +4612,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -4797,7 +4797,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 72bd4a876d..856757bab1 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -122,16 +122,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 9474608b1a..fc82d12ebf 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -2075,13 +2075,11 @@ global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 - local.set $1 - local.get $0 i32.load if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load offset=4 i32.eqz end @@ -2122,10 +2120,12 @@ global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 - local.get $0 i32.load i32.const 1 i32.add + local.set $1 + local.get $0 + local.get $1 i32.store local.get $0 local.get $0 @@ -2158,10 +2158,12 @@ end global.get $std/operator-overloading/incdec local.tee $0 - local.get $0 i32.load i32.const 1 i32.sub + local.set $1 + local.get $0 + local.get $1 i32.store local.get $0 local.get $0 diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index c19a897f7d..28130fa71a 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -224,8 +224,8 @@ call $~lib/builtins/abort unreachable end - global.get $std/pointer/one global.get $std/pointer/two + global.get $std/pointer/one i32.add global.set $std/pointer/add global.get $std/pointer/add diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index feeceffebf..7698cecf1d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -386,11 +386,11 @@ local.get $3 i32.lt_u if - local.get $1 local.get $0 local.get $2 i32.add i32.load8_u + local.get $1 i32.xor i32.const 16777619 i32.mul @@ -455,16 +455,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end @@ -524,31 +524,31 @@ i32.shl i32.add i32.load - local.set $1 + local.set $0 loop $while-continue|0 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 i32.const 1 i32.and if (result i32) i32.const 0 else - local.get $1 + local.get $0 i32.load i32.const 1040 call $~lib/string/String.__eq end if - local.get $1 + local.get $0 return end - local.get $1 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $1 + local.set $0 br $while-continue|0 end end @@ -565,107 +565,99 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $6 - local.get $2 - local.set $3 + local.set $7 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $6 - local.get $8 + local.get $4 + local.get $7 i32.ne if - local.get $8 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 + local.get $2 local.get $4 - local.get $8 i32.load call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl + local.get $5 i32.add - local.tee $5 + local.tee $8 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $8 + local.get $4 i32.const 12 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end local.get $0 - local.set $3 - local.get $4 - local.tee $0 - local.get $3 i32.load - i32.ne drop - local.get $3 local.get $0 + local.get $5 i32.store - local.get $3 + local.get $0 local.get $1 i32.store offset=4 - local.get $2 - local.tee $0 - local.get $3 + local.get $0 i32.load offset=8 - i32.ne drop - local.get $3 local.get $0 - i32.store offset=8 local.get $3 - local.get $7 + i32.store offset=8 + local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 ) @@ -839,107 +831,99 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $6 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $2 + local.set $3 local.get $0 i32.load offset=8 - local.tee $8 + local.tee $4 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $6 - local.get $2 - local.set $3 + local.set $7 + local.get $3 + local.set $2 loop $while-continue|0 - local.get $6 - local.get $8 + local.get $4 + local.get $7 i32.ne if - local.get $8 + local.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load i32.store - local.get $3 - local.get $8 + local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 + local.get $2 local.get $4 - local.get $8 i32.load call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl + local.get $5 i32.add - local.tee $5 + local.tee $8 i32.load i32.store offset=8 - local.get $5 - local.get $3 + local.get $8 + local.get $2 i32.store - local.get $3 + local.get $2 i32.const 12 i32.add - local.set $3 + local.set $2 end - local.get $8 + local.get $4 i32.const 12 i32.add - local.set $8 + local.set $4 br $while-continue|0 end end local.get $0 - local.set $3 - local.get $4 - local.tee $0 - local.get $3 i32.load - i32.ne drop - local.get $3 local.get $0 + local.get $5 i32.store - local.get $3 + local.get $0 local.get $1 i32.store offset=4 - local.get $2 - local.tee $0 - local.get $3 + local.get $0 i32.load offset=8 - i32.ne drop - local.get $3 local.get $0 - i32.store offset=8 local.get $3 - local.get $7 + i32.store offset=8 + local.get $0 + local.get $6 i32.store offset=12 - local.get $3 - local.get $3 + local.get $0 + local.get $0 i32.load offset=20 i32.store offset=16 ) diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 9e7622c6ef..ef8bc54d29 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -75,16 +75,16 @@ local.set $2 local.get $3 if - local.get $1 + local.get $0 i32.load16_u local.tee $3 - local.get $0 + local.get $1 i32.load16_u local.tee $4 i32.ne if - local.get $4 local.get $3 + local.get $4 i32.sub return end diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index a6b3c174ca..e06717fa8a 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -1715,71 +1715,76 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) call $~lib/string/String.UTF8.byteLength - local.tee $6 - i32.const 56 - local.get $6 + local.tee $7 i32.const 56 i32.gt_s + local.set $6 + local.get $7 + i32.const 56 + local.get $6 select i32.const 13 i32.add call $~lib/rt/stub/__alloc - local.tee $6 + local.tee $7 i32.const 8 i32.add local.tee $8 i32.const 4 i32.add - local.set $7 - local.get $6 + local.set $6 local.get $7 + local.get $6 i32.store - local.get $7 + local.get $6 i64.const 9071406388179572 i64.store - local.get $6 + local.get $7 i32.const 7 i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $6 + local.get $7 i32.const 1040 i32.const 1040 call $~lib/string/String#get:length - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop local.get $0 if (result i32) - local.get $7 + local.get $6 i32.const 32 i32.store8 local.get $6 - local.get $7 i32.const 1 i32.add - local.tee $7 - local.get $7 + local.tee $6 local.get $1 call $~lib/util/number/dtoa_stream + local.set $9 local.get $7 + local.get $6 + local.get $9 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1788,18 +1793,18 @@ i32.const 1 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $2 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1808,18 +1813,18 @@ i32.const 2 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $3 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1828,18 +1833,18 @@ i32.const 3 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $4 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1848,18 +1853,18 @@ i32.const 4 i32.gt_s if - local.get $6 - local.get $7 local.get $7 + local.get $6 + local.get $6 local.get $5 call $~lib/util/number/dtoa_stream - local.get $7 + local.get $6 call $~lib/string/String.UTF8.encodeUnsafe i32.const 1 i32.add i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write @@ -1868,29 +1873,29 @@ end end end - local.get $7 + local.get $6 i32.const 1 i32.sub else - local.get $7 + local.get $6 end i32.const 10 i32.store8 - local.get $6 + local.get $7 i32.const 1 i32.store offset=4 i32.const 2 - local.get $6 + local.get $7 i32.const 1 local.get $8 call $~lib/bindings/wasi_snapshot_preview1/fd_write drop - local.get $6 + local.get $7 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $6 + local.get $7 select i32.eqz if @@ -1899,7 +1904,7 @@ call $~lib/wasi/index/abort unreachable end - local.get $6 + local.get $7 i32.const 16 i32.sub local.tee $0 @@ -1913,7 +1918,7 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $6 + local.get $7 local.get $0 i32.load i32.add