diff --git a/cli/asc.js b/cli/asc.js index 8a38d2d3ba..a94d42a69c 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -694,20 +694,24 @@ 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) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { - add("simplify-locals-nostructure"); // differs + add("flatten"); // differs + add("simplify-locals-notee-nostructure"); // differs add("vacuum"); // differs - add("reorder-locals"); // differs + add("code-folding"); // differs add("flatten"); add("local-cse"); + add("reorder-locals"); // differs } if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); + add("vacuum"); } if (hasARC) { // differs if (optimizeLevel < 3) { @@ -715,27 +719,22 @@ exports.main = function main(argv, options, callback) { } add("post-assemblyscript"); } + add("optimize-instructions"); // differs + add("inlining"); // differs add("dce"); add("remove-unused-brs"); add("remove-unused-names"); - // add("optimize-instructions"); // differs move 2 lines above + add("inlining-optimizing"); // 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 { add("precompute"); } - if (module.getLowMemoryUnused()) { - if (optimizeLevel >= 3 || shrinkLevel >= 1) { - add("optimize-added-constants-propagate"); - } else { - add("optimize-added-constants"); - } - } + add("vacuum"); // differs // this will be done later (1) // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); @@ -776,18 +775,28 @@ 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"); } add("vacuum"); // PassRunner::addDefaultGlobalOptimizationPostPasses if (optimizeLevel >= 2 || shrinkLevel >= 1) { + add("simplify-globals-optimizing"); // differs add("dae-optimizing"); } 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"); @@ -795,6 +804,7 @@ exports.main = function main(argv, options, callback) { add("simplify-globals-optimizing"); } else { add("simplify-globals"); + add("vacuum"); // differs } // moved from (2) // it works better after globals optimizations like simplify-globals, inlining-optimizing and etc @@ -814,10 +824,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) @@ -825,17 +831,23 @@ 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"); - add("coalesce-locals"); + add("vacuum"); add("merge-locals"); + add("coalesce-locals"); add("simplify-locals-nostructure"); add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); } + add("remove-unused-brs"); + add("remove-unused-names"); + add("vacuum"); add("optimize-instructions"); add("simplify-globals-optimizing"); } diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 870af63c48..c72cde40e7 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -213,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 @@ -235,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/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/do.optimized.wat b/tests/compiler/do.optimized.wat index bc3a3c3f27..d3ce08b230 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 @@ -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 @@ -1051,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 @@ -1072,7 +1071,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1088,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 @@ -1188,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 @@ -1213,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|04 - local.get $1 + i32.const 0 + local.set $1 + loop $do-continue|03 + 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|04 + br $do-continue|03 end end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1247,7 +1246,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 90 i32.ne if @@ -1263,8 +1262,8 @@ i32.const 0 global.set $do/ran call $do/Ref#constructor - local.set $1 - loop $do-continue|05 + local.set $0 + loop $do-continue|04 local.get $2 i32.const 1 i32.add @@ -1273,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|05 + local.get $1 + local.tee $0 + br_if $do-continue|04 end local.get $2 i32.const 10 @@ -1300,7 +1299,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1311,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 @@ -1328,8 +1327,8 @@ i32.const 0 local.set $2 call $do/Ref#constructor - local.set $1 - loop $do-continue|06 + local.set $0 + loop $do-continue|05 block $do-break|0 local.get $2 i32.const 1 @@ -1338,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|06 + local.get $1 + br_if $do-continue|05 end end local.get $2 @@ -1365,7 +1364,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1040 @@ -1376,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 @@ -1430,16 +1429,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 99a4a8a378..e0b0674624 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))) @@ -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 @@ -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/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 - ) ) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 683bb9be8a..5ffcec178e 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 @@ -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 @@ -1162,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 @@ -1184,14 +1183,14 @@ global.set $for/ran i32.const 0 local.set $1 - loop $for-loop|04 + loop $for-loop|06 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|06 end local.get $1 i32.const 10 @@ -1214,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 @@ -1223,7 +1222,7 @@ i32.const 1 i32.add local.set $1 - br $for-loop|05 + br $for-loop|07 end end local.get $1 @@ -1264,7 +1263,7 @@ global.set $for/ran call $for/Ref#constructor local.set $1 - loop $for-loop|06 + loop $for-loop|03 local.get $1 if local.get $3 @@ -1289,7 +1288,7 @@ end local.get $0 local.set $1 - br $for-loop|06 + br $for-loop|03 end end local.get $3 @@ -1332,7 +1331,7 @@ call $for/Ref#constructor local.set $0 call $~lib/rt/pure/__release - loop $for-loop|07 + loop $for-loop|05 block $for-break0 call $for/Ref#constructor local.tee $1 @@ -1359,7 +1358,7 @@ local.get $0 call $~lib/rt/pure/__release local.set $0 - br $for-loop|07 + br $for-loop|05 end end end @@ -1439,16 +1438,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 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 - ) ) diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 7330373bbe..454a19e0c9 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 @@ -1211,16 +1211,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 4d93f0286b..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 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 1a1c36bb9e..555c78f813 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 @@ -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 @@ -964,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 @@ -979,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 @@ -1028,16 +1028,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 8fac7c3390..0ed2b2c8b5 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))) @@ -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 @@ -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 @@ -1008,7 +1007,7 @@ end i32.const 0 ) - (func $~start + (func $start:managed-cast (local $0 i32) (local $1 i32) (local $2 i32) @@ -1017,13 +1016,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end call $managed-cast/Cat#constructor call $managed-cast/Cat#constructor local.tee $3 @@ -1113,6 +1105,16 @@ local.get $7 call $~lib/rt/pure/__release ) + (func $~start + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end + call $start:managed-cast + ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1144,16 +1146,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 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/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index a4082b6c30..8952f746c9 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -188,32 +188,26 @@ 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 - i32.const 1 + local.get $0 + local.tee $4 + i32.const 2 i32.add local.set $0 - local.get $4 - i32.const 1 + local.get $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 @@ -292,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 @@ -477,175 +467,157 @@ 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 - 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 @@ -658,87 +630,77 @@ 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 + 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 @@ -751,43 +713,37 @@ 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 + 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 @@ -798,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 34ff5889e5..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) @@ -287,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 @@ -1056,9 +1055,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 @@ -1084,7 +1083,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1112,9 +1111,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 @@ -1140,7 +1139,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -1269,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 @@ -1453,6 +1397,8 @@ ) (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 @@ -1468,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 @@ -1578,11 +1578,11 @@ unreachable end global.get $number/a - local.tee $0 + local.tee $1 i32.const 1 i32.add global.set $number/a - local.get $0 + local.get $1 call $~lib/number/I32#toString i32.const 1072 call $~lib/string/String.__eq @@ -1596,11 +1596,11 @@ unreachable end global.get $number/a - local.tee $0 + local.tee $1 i32.const 1 i32.sub global.set $number/a - local.get $0 + local.get $1 call $~lib/number/I32#toString i32.const 2464 call $~lib/string/String.__eq diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 6932e30fa2..c49de915d2 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 @@ -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 @@ -987,16 +986,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 10d1489327..6a906a7a83 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 @@ -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 @@ -1029,16 +1028,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index cab8fc5668..946c55476b 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 @@ -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 @@ -1031,16 +1030,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 9b4eecde16..adad34ed33 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 @@ -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 @@ -1082,16 +1081,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 806a93a5ce..160b6e5eb6 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 @@ -1127,16 +1127,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 3f08ebd824..ae587c4e1a 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 @@ -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 @@ -1030,16 +1029,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 0c21077548..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 - 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 + block $__inlined_func$~lib/util/number/utoa64 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 - i32.store16 local.get $0 - i64.const 0 - i64.ne - br_if $do-continue|0 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $0 + i64.const 10000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000000 + i64.ge_u + i32.const 16 + i32.add + local.get $0 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add + local.get $0 + i64.const 1000000000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select + local.tee $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) @@ -526,23 +526,24 @@ i64.load i32.wrap_i64 local.tee $1 + local.set $0 + i32.const 1184 + local.set $2 + local.get $1 if - local.get $1 + 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 $0 + local.tee $2 + local.get $0 local.get $1 - local.get $2 call $~lib/util/number/utoa_simple - else - i32.const 1184 - local.set $0 end - local.get $0 + 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 61ac92c7f7..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 @@ -1070,9 +1070,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 @@ -1098,7 +1098,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -1126,9 +1126,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 @@ -1154,7 +1154,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -1289,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 @@ -1332,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 @@ -1346,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) @@ -1365,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 @@ -1580,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 @@ -1793,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 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b0f79147b4..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) @@ -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 ) @@ -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 @@ -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 @@ -1397,9 +1396,9 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -1414,17 +1413,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $7 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 $7 i64.mul local.get $2 i64.const 4294967295 @@ -1453,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 @@ -1467,28 +1463,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $7 i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - local.get $6 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $10 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 + local.get $7 i64.mul - local.get $6 + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1510,17 +1509,17 @@ 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 $7 i64.mul - local.get $6 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 $5 + 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) @@ -1574,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 @@ -1617,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 @@ -1631,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.get $0 + (local $4 f64) + block $__inlined_func$~lib/util/number/dtoa 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) @@ -1779,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 @@ -1879,30 +1889,26 @@ (func $~lib/number/U8#toString (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - block $__inlined_func$~lib/util/number/utoa32 + 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 - if - i32.const 2624 - local.set $0 - br $__inlined_func$~lib/util/number/utoa32 - end - local.get $1 call $~lib/util/number/decimalCount32 local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 + local.tee $1 + local.get $0 local.get $2 call $~lib/util/number/utoa_simple end - local.get $0 + local.get $1 ) (func $start:resolve-elementaccess (local $0 i32) @@ -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 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-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..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-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 85612ecfb8..d0f016834d 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 @@ -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) @@ -2011,9 +2009,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 +2037,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -2067,9 +2065,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 +2093,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -2456,16 +2454,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 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/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 8e22b9cb9e..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 @@ -1769,28 +1769,28 @@ 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 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.tee $0 + local.get $3 i32.load local.tee $4 i32.ne @@ -1801,26 +1801,25 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store + local.get $3 local.get $2 - 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 $2 i32.const 1 i32.lt_s if @@ -1831,47 +1830,47 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=4 - local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $0 + local.tee $2 i32.const 2 i32.shl i32.add i32.load drop - local.get $1 - local.get $0 + local.get $3 + local.get $2 i32.store offset=12 - local.get $1 + 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 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.tee $0 + local.get $3 i32.load local.tee $4 i32.ne @@ -1882,49 +1881,49 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store + local.get $3 local.get $2 - 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 $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 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.tee $0 + local.get $3 i32.load local.tee $5 i32.ne @@ -1935,16 +1934,16 @@ local.get $5 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 local.get $0 i32.store + local.get $3 local.get $2 - 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 +1953,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 + local.tee $2 call $~lib/array/ensureSize - local.get $2 + local.get $3 i32.load offset=4 local.get $5 i32.const 2 @@ -1970,8 +1969,8 @@ i32.add i32.const 1344 i32.store + local.get $3 local.get $2 - local.get $1 i32.store offset=12 local.get $0 i32.const 1 @@ -1980,12 +1979,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 $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end @@ -1993,10 +1992,10 @@ 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 @@ -2006,17 +2005,17 @@ local.tee $2 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.tee $1 i32.load local.tee $4 i32.ne @@ -2027,61 +2026,63 @@ local.get $4 call $~lib/rt/pure/__release end + local.get $1 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 $1 + local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $1 i32.store local.get $0 - local.tee $3 - local.get $1 + local.tee $1 + local.get $3 local.tee $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $1 i32.store local.get $2 - local.tee $3 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $1 i32.store - local.get $0 + local.get $3 local.get $2 - local.tee $3 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2092,27 +2093,27 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $3 + local.get $1 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 $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $1 local.get $0 call $~lib/rt/pure/__release end - local.get $1 local.get $3 + local.get $1 i32.store 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/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 3e604862a1..a6195302f5 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) diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a73612e31e..a73cfa0150 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 @@ -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 @@ -1027,16 +1026,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 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/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index c9c9196708..fa32ef6903 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 @@ -1127,16 +1127,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 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/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index c642465f15..ddd2247e86 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 ) @@ -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 34431de0da..e81a55fa75 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)) @@ -860,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 @@ -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,56 +1879,54 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 i32.add i32.load8_u ) (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) @@ -2029,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 @@ -2195,10 +2190,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 @@ -2411,7 +2406,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 +2414,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 +2439,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 +2451,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 +2465,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 +2610,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 +2628,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 +2653,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 +2667,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 +2680,7 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 local.get $1 i32.sub i32.const 2 @@ -2695,11 +2688,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) @@ -2969,8 +2962,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) @@ -2991,8 +2983,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3067,8 +3057,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3144,8 +3132,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3221,8 +3207,6 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $0 i32.load offset=4 local.get $2 @@ -3394,7 +3378,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 i32.load offset=12 local.tee $4 @@ -3418,12 +3401,13 @@ select i32.lt_s if - i32.const 3 - global.set $~argumentsLength local.get $2 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 +3416,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 @@ -3503,10 +3482,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 @@ -3582,8 +3558,6 @@ select i32.lt_s if - i32.const 4 - global.set $~argumentsLength local.get $2 local.get $0 i32.load offset=4 @@ -3650,8 +3624,6 @@ i32.const 0 i32.ge_s if - i32.const 4 - global.set $~argumentsLength local.get $2 local.get $0 i32.load offset=4 @@ -3772,92 +3744,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 @@ -3865,37 +3758,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 @@ -3905,93 +3798,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 @@ -3999,12 +3887,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 @@ -4022,11 +3910,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 @@ -4038,32 +3926,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 @@ -4077,10 +3960,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 @@ -4090,26 +3973,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) @@ -4141,171 +4024,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 @@ -4313,37 +4038,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 @@ -4353,93 +4078,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 @@ -4447,12 +4167,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 @@ -4470,11 +4190,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 @@ -4486,32 +4206,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 @@ -4525,10 +4240,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 @@ -4538,26 +4253,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) @@ -4589,85 +4304,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 @@ -4689,85 +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 - block $while-break|1 - 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.get $2 - call_indirect (type $i32_i32_=>_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 - 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) @@ -4838,18 +4395,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 @@ -4955,18 +4508,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 @@ -5033,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 @@ -5045,30 +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.set $3 - local.get $4 - i32.load - local.set $2 - i32.const 2 - global.set $~argumentsLength - local.get $3 + 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 $4 local.get $2 + local.get $5 i32.store offset=4 - local.get $4 + local.get $2 local.get $3 i32.store end @@ -5077,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 @@ -5224,8 +4840,6 @@ local.get $4 i32.lt_s if - i32.const 2 - global.set $~argumentsLength i32.const 0 local.get $0 local.get $2 @@ -5296,6 +4910,7 @@ i32.store offset=12 end local.get $2 + local.tee $3 local.get $0 i32.load offset=4 local.get $1 @@ -5308,7 +4923,7 @@ i32.ne if local.get $0 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $1 @@ -5411,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 @@ -5423,41 +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.set $2 - local.get $3 - i32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength + local.tee $3 local.get $2 - local.get $4 + i32.load + 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 ) @@ -5482,8 +5165,6 @@ local.get $6 i32.lt_s if - i32.const 2 - global.set $~argumentsLength local.get $0 local.get $2 i32.const 1 @@ -5709,140 +5390,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 - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.set $2 - i32.const 0 - local.get $1 - call $~lib/string/String#get:length - local.tee $3 - i32.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 + block $folding-inner0 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 $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) + local.get $1 + i32.eqz i32.const 1 - local.set $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 - 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 + select + br_if $folding-inner0 + local.get $2 + i32.eqz + if + i32.const -1 + return 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 + 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 $5 - call $~lib/rt/pure/__release + i32.const 0 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5853,30 +5448,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) @@ -5941,152 +5534,6 @@ local.get $1 end ) - (func $std/array/createRandomStringArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - i32.const 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 $7 - i32.const 0 - i32.store - local.get $7 - i32.const 0 - i32.store offset=4 - local.get $7 - i32.const 0 - i32.store offset=8 - local.get $7 - i32.const 0 - i32.store offset=12 - local.get $0 - local.tee $1 - local.get $7 - i32.load - local.tee $6 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $6 - call $~lib/rt/pure/__release - end - local.get $7 - local.get $1 - i32.store - local.get $7 - local.get $0 - i32.store offset=4 - local.get $7 - i32.const 1600 - i32.store offset=8 - local.get $7 - i32.const 400 - i32.store offset=12 - loop $for-loop|0 - local.get $5 - i32.const 400 - i32.lt_s - if - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - local.set $2 - i32.const 0 - local.set $4 - i32.const 6064 - local.set $1 - loop $for-loop|00 - local.get $4 - local.get $2 - 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 - i32.const 5088 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $1 - 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 $3 - local.get $1 - i32.const 1 - i32.shl - i32.const 5088 - i32.add - i32.load16_u - i32.store16 - local.get $3 - call $~lib/rt/pure/__retain - end - local.tee $6 - call $~lib/string/String.__concat - local.tee $3 - local.tee $1 - local.get $0 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $6 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|00 - end - end - local.get $7 - local.get $5 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $7 - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -7275,9 +6722,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 @@ -7303,7 +6750,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -7331,9 +6778,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 @@ -7359,7 +6806,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -7375,15 +6822,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 @@ -7400,22 +6847,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 @@ -7423,14 +6863,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 @@ -7442,16 +6893,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 @@ -7500,9 +6946,9 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -7517,17 +6963,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $7 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 $7 i64.mul local.get $2 i64.const 4294967295 @@ -7556,7 +6999,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 @@ -7570,28 +7013,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $7 i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - local.get $6 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $10 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 + local.get $7 i64.mul - local.get $6 + local.get $5 i64.const 4294967295 i64.and i64.add @@ -7613,17 +7059,17 @@ 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 $7 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -7639,7 +7085,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -7653,13 +7099,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) @@ -7951,24 +7397,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 +7483,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 +7565,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 @@ -8185,6 +7630,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -8192,7 +7638,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -8202,28 +7647,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 ) @@ -8680,13 +8124,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 @@ -8889,13 +8334,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 @@ -9084,24 +8530,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 +8617,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 +8840,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 +8925,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 +9004,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 +9091,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 +9178,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 +9263,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 ) @@ -10090,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) @@ -10113,14 +9555,14 @@ (local $31 i32) (local $32 i32) (local $33 i32) - (local $34 i32) - (local $35 i32) - (local $36 f64) + (local $34 f32) + (local $35 f64) + (local $36 i32) (local $37 i32) (local $38 i32) (local $39 i32) (local $40 i32) - (local $41 f32) + (local $41 i32) (local $42 i32) (local $43 i32) (local $44 i32) @@ -10139,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 @@ -10148,52 +9592,52 @@ i32.const 5 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $1 i32.const 1 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $2 i32.const 0 i32.const 1 call $~lib/memory/memory.fill - local.get $59 + local.get $1 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $59 + local.set $1 end - local.get $59 + local.get $1 i32.const 0 i32.store - local.get $59 + local.get $1 i32.const 0 i32.store offset=4 - local.get $59 + local.get $1 i32.const 0 i32.store offset=8 - local.get $0 - local.tee $1 - local.get $59 + local.get $2 + local.tee $0 + local.get $1 i32.load - local.tee $56 + local.tee $3 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 $3 call $~lib/rt/pure/__release end - local.get $59 local.get $1 - i32.store - local.get $59 local.get $0 + i32.store + local.get $1 + local.get $2 i32.store offset=4 - local.get $59 + local.get $1 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -10207,7 +9651,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $59 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -10215,20 +9659,20 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $0 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -10239,20 +9683,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $59 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -10263,20 +9707,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $58 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -10287,20 +9731,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $56 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -10311,20 +9755,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $57 + local.tee $9 call $std/array/isArraysEqual i32.eqz if @@ -10335,17 +9779,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $2 call $~lib/rt/pure/__release - local.get $58 + local.get $1 call $~lib/rt/pure/__release - local.get $56 + local.get $4 call $~lib/rt/pure/__release - local.get $57 + local.get $3 + call $~lib/rt/pure/__release + local.get $9 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10353,20 +9797,20 @@ i32.const 1696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $0 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10378,20 +9822,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $59 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10403,20 +9847,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $58 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10428,20 +9872,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $56 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10453,20 +9897,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + 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 $57 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10478,17 +9922,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $2 call $~lib/rt/pure/__release - local.get $58 + local.get $1 call $~lib/rt/pure/__release - local.get $56 + local.get $4 call $~lib/rt/pure/__release - local.get $57 + local.get $3 + call $~lib/rt/pure/__release + local.get $9 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10751,28 +10195,28 @@ 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 $59 + local.tee $2 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 local.tee $1 - local.get $59 + local.get $2 i32.const 2 i32.shl i32.add - local.set $59 + local.set $2 loop $do-continue|0 local.get $1 i32.load @@ -10781,7 +10225,7 @@ i32.const 4 i32.add local.tee $1 - local.get $59 + local.get $2 i32.lt_u br_if $do-continue|0 end @@ -10807,11 +10251,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $0 + local.set $2 global.get $std/array/arr - local.get $0 + local.get $2 call $~lib/array/Array#concat - local.set $59 + local.set $1 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10836,7 +10280,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -10848,14 +10292,14 @@ call $~lib/builtins/abort unreachable end - local.get $59 + 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 $56 + local.tee $3 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10870,7 +10314,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10883,7 +10327,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10896,7 +10340,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10909,17 +10353,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 46 call $~lib/array/Array#push - local.get $0 + local.get $2 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $0 + local.get $2 call $~lib/array/Array#concat - local.set $1 - local.get $59 + local.set $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10933,7 +10377,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=12 i32.const 2 i32.ne @@ -10945,7 +10389,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=12 i32.const 5 i32.ne @@ -10957,7 +10401,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10970,7 +10414,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10983,7 +10427,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10996,7 +10440,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -11009,7 +10453,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -11022,10 +10466,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/array/Array#pop drop - local.get $1 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -11043,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 @@ -11053,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 $58 - local.get $1 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $4 i32.load offset=12 i32.const 3 i32.ne @@ -11071,7 +10515,7 @@ call $~lib/builtins/abort unreachable end - local.get $59 + local.get $1 i32.load offset=12 if i32.const 0 @@ -11081,13 +10525,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $58 + local.get $4 call $~lib/rt/pure/__release - local.get $56 + 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 @@ -11095,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 $59 + 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 $58 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11126,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 $56 + 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 $57 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11158,21 +10602,22 @@ i32.const 2256 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 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $42 + 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 @@ -11190,21 +10635,21 @@ i32.const 2352 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + 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 $50 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11222,21 +10667,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + 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 $49 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11254,21 +10699,21 @@ i32.const 2544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + local.tee $2 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $48 + 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 $46 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11286,21 +10731,21 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + local.tee $2 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $45 + 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 $44 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11318,21 +10763,21 @@ i32.const 2736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + local.tee $2 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $31 + 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 @@ -11350,21 +10795,21 @@ i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + local.tee $2 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $47 + 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 $40 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11382,21 +10827,22 @@ i32.const 2928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.set $0 + local.get $2 call $~lib/rt/pure/__release - local.tee $0 + local.get $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $39 + 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 $38 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11414,22 +10860,22 @@ i32.const 3024 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 -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $37 + 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 $35 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11448,21 +10894,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 -4 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 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11476,53 +10922,53 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $1 call $~lib/rt/pure/__release - local.get $58 + local.get $4 call $~lib/rt/pure/__release - local.get $56 + local.get $3 call $~lib/rt/pure/__release - local.get $57 + local.get $9 call $~lib/rt/pure/__release - local.get $42 + 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 $50 + local.get $6 call $~lib/rt/pure/__release - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $49 + local.get $10 call $~lib/rt/pure/__release - local.get $48 + local.get $13 call $~lib/rt/pure/__release - local.get $46 + local.get $16 call $~lib/rt/pure/__release - local.get $45 + local.get $30 call $~lib/rt/pure/__release - local.get $44 + local.get $18 call $~lib/rt/pure/__release - local.get $31 + local.get $19 call $~lib/rt/pure/__release - local.get $43 + local.get $20 call $~lib/rt/pure/__release - local.get $47 + local.get $14 call $~lib/rt/pure/__release - local.get $40 + local.get $21 call $~lib/rt/pure/__release - local.get $39 + local.get $22 call $~lib/rt/pure/__release - local.get $38 + local.get $23 call $~lib/rt/pure/__release - local.get $37 + local.get $24 call $~lib/rt/pure/__release - local.get $35 + local.get $26 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $34 + local.get $27 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -11696,9 +11142,9 @@ unreachable end global.get $std/array/arr - local.tee $0 + local.tee $2 i32.load offset=12 - local.tee $59 + local.tee $1 i32.const 1 i32.lt_s if @@ -11709,29 +11155,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 - local.tee $1 + local.tee $0 i32.load - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.const 4 i32.add - local.get $59 + local.get $1 i32.const 1 i32.sub - local.tee $59 + local.tee $1 i32.const 2 i32.shl - local.tee $56 + local.tee $3 call $~lib/memory/memory.copy - local.get $1 - local.get $56 + local.get $0 + local.get $3 i32.add i32.const 0 i32.store - local.get $0 - local.get $59 + local.get $2 + local.get $1 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11899,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 $59 - local.get $0 + local.set $0 + local.get $2 i32.load offset=4 local.get $1 i32.const 1 @@ -11916,24 +11362,24 @@ i32.add local.set $1 loop $while-continue|0 - local.get $59 + local.get $0 local.get $1 i32.lt_u if - local.get $59 + local.get $0 i32.load - local.set $58 - local.get $59 + local.set $2 + local.get $0 local.get $1 i32.load i32.store local.get $1 - local.get $58 + local.get $2 i32.store - local.get $59 + local.get $0 i32.const 4 i32.add - local.set $59 + local.set $0 local.get $1 i32.const 4 i32.sub @@ -12175,36 +11621,36 @@ i32.const 3216 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $56 + local.tee $2 + local.set $3 i32.const 0 - local.set $1 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $2 i32.load offset=12 - local.tee $59 + local.tee $1 if (result i32) i32.const 0 - local.get $59 + local.get $1 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 $3 i32.load offset=4 - local.set $58 + local.set $4 loop $while-continue|022 + local.get $0 local.get $1 - local.get $59 i32.lt_s if - local.get $58 - local.get $1 + local.get $4 + local.get $0 i32.const 2 i32.shl i32.add @@ -12212,17 +11658,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 @@ -12239,36 +11685,36 @@ i32.const 3248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 - local.set $57 + local.tee $1 + local.set $9 i32.const 0 - local.set $1 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $59 + local.get $1 i32.load offset=12 - local.tee $58 + local.tee $4 if (result i32) i32.const 0 - local.get $58 + local.get $4 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 $9 i32.load offset=4 - local.set $56 + local.set $3 loop $while-continue|023 - local.get $1 - local.get $58 + local.get $0 + local.get $4 i32.lt_s if - local.get $56 - local.get $1 + local.get $3 + local.get $0 i32.const 3 i32.shl i32.add @@ -12276,17 +11722,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 @@ -12297,9 +11743,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $59 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -12439,7 +11885,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 @@ -12447,49 +11893,49 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 i32.load offset=12 - local.tee $58 + local.tee $1 if (result i32) i32.const 0 - local.get $58 + local.get $1 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $4 i32.load offset=4 - local.set $57 + local.set $9 loop $while-continue|024 - local.get $59 - local.get $58 + local.get $0 + local.get $1 i32.lt_s if i32.const 1 - local.get $57 - local.get $59 + local.get $9 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $41 + local.tee $11 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $41 - local.get $41 + local.get $11 + local.get $11 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 @@ -12506,7 +11952,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $59 + local.set $1 i32.const 0 i32.const 1 i32.const 3 @@ -12514,49 +11960,49 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $2 i32.load offset=12 - local.tee $56 + local.tee $3 if (result i32) i32.const 0 - local.get $56 + local.get $3 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $58 + local.get $2 i32.load offset=4 - local.set $42 + local.set $15 loop $while-continue|025 - local.get $59 - local.get $56 + local.get $1 + local.get $3 i32.lt_s if i32.const 1 - local.get $42 - local.get $59 + local.get $15 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $36 + local.tee $17 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $36 - local.get $36 + local.get $17 + local.get $17 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $59 + local.get $1 i32.const 1 i32.add - local.set $59 + local.set $1 br $while-continue|025 end end @@ -12626,9 +12072,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $4 call $~lib/rt/pure/__release - local.get $58 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12636,18 +12082,18 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $57 + 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 $54 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12659,14 +12105,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + 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 $52 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12684,21 +12130,21 @@ i32.const 3456 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 0 i32.const 0 call $~lib/array/Array#splice - local.tee $50 + 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 $53 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12710,14 +12156,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 $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12735,21 +12181,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 $2 local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $48 + local.tee $13 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 @@ -12761,14 +12207,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + 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 $45 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12787,20 +12233,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $1 - local.get $0 + local.get $2 call $~lib/rt/pure/__release local.get $1 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $44 + 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 $43 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12819,7 +12265,7 @@ i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12837,20 +12283,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.tee $1 + local.get $0 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $40 + 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 $39 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12862,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 $38 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12887,20 +12334,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 $24 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 $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12912,14 +12359,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 $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12937,20 +12384,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 $31 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 $32 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12962,14 +12409,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 $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12987,20 +12434,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 $28 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 $29 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13012,14 +12459,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 $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13037,20 +12484,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 $37 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 $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13062,14 +12509,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 $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13087,20 +12534,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 $40 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 $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13112,14 +12559,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 $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13137,20 +12584,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 $43 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 $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13162,14 +12609,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 $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13187,20 +12634,21 @@ i32.const 4576 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 4 i32.const 0 call $~lib/array/Array#splice - local.tee $17 + 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 $16 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13212,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 $15 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13238,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 $14 + 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 $13 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13270,7 +12718,7 @@ i32.const 4752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13288,21 +12736,21 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $11 + 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 $10 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13314,14 +12762,14 @@ call $~lib/builtins/abort unreachable end - local.get $59 + 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 $9 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13339,10 +12787,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $56 + local.tee $15 i32.load offset=12 if i32.const 0 @@ -13352,7 +12800,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $1 i32.load offset=12 if i32.const 0 @@ -13368,37 +12816,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $9 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 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $0 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $1 + local.get $0 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $1 + local.get $0 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $58 + local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $9 i32.const 2 call $~lib/array/Array#splice - local.set $42 - local.get $56 + local.set $25 + local.get $15 call $~lib/rt/pure/__release - local.get $42 + local.get $25 i32.load offset=12 i32.const 2 i32.ne @@ -13410,10 +12858,10 @@ call $~lib/builtins/abort unreachable end - local.get $42 + local.get $25 i32.const 0 call $~lib/array/Array#__get - local.tee $8 + local.tee $55 i32.load i32.const 3 i32.ne @@ -13425,10 +12873,10 @@ call $~lib/builtins/abort unreachable end - local.get $42 + local.get $25 i32.const 1 call $~lib/array/Array#__get - local.tee $7 + local.tee $56 i32.load i32.const 4 i32.ne @@ -13440,7 +12888,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $9 i32.load offset=12 i32.const 3 i32.ne @@ -13452,10 +12900,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $9 i32.const 0 call $~lib/array/Array#__get - local.tee $6 + local.tee $57 i32.load i32.const 1 i32.ne @@ -13467,10 +12915,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $9 i32.const 1 call $~lib/array/Array#__get - local.tee $5 + local.tee $58 i32.load i32.const 2 i32.ne @@ -13482,10 +12930,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $9 i32.const 2 call $~lib/array/Array#__get - local.tee $4 + local.tee $59 i32.load i32.const 5 i32.ne @@ -13503,22 +12951,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + 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 $56 + local.get $15 call $~lib/array/Array#splice - local.tee $31 + local.tee $30 i32.load offset=12 i32.const 1 i32.ne @@ -13530,11 +12978,11 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $30 i32.const 0 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -13555,7 +13003,7 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $15 i32.load offset=12 i32.const 2 i32.ne @@ -13567,10 +13015,10 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $15 i32.const 0 call $~lib/array/Array#__get - local.tee $3 + local.tee $60 if i32.const 0 i32.const 1296 @@ -13579,11 +13027,11 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $15 i32.const 1 call $~lib/array/Array#__get - local.tee $58 - local.get $58 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -13604,107 +13052,107 @@ call $~lib/builtins/abort unreachable end - local.get $59 - call $~lib/rt/pure/__release - local.get $57 + local.get $2 call $~lib/rt/pure/__release - local.get $54 + local.get $4 call $~lib/rt/pure/__release - local.get $52 + local.get $3 call $~lib/rt/pure/__release - local.get $50 + local.get $7 call $~lib/rt/pure/__release - local.get $53 + local.get $6 call $~lib/rt/pure/__release - local.get $49 + local.get $8 call $~lib/rt/pure/__release - local.get $48 + local.get $10 call $~lib/rt/pure/__release - local.get $46 + local.get $13 call $~lib/rt/pure/__release - local.get $45 + local.get $16 call $~lib/rt/pure/__release - local.get $44 + local.get $18 call $~lib/rt/pure/__release - local.get $43 + local.get $19 call $~lib/rt/pure/__release - local.get $47 + local.get $20 call $~lib/rt/pure/__release - local.get $40 + local.get $14 call $~lib/rt/pure/__release - local.get $39 + local.get $21 call $~lib/rt/pure/__release - local.get $38 + local.get $22 call $~lib/rt/pure/__release - local.get $37 + local.get $23 call $~lib/rt/pure/__release - local.get $35 + local.get $24 call $~lib/rt/pure/__release - local.get $34 + local.get $26 call $~lib/rt/pure/__release - local.get $30 + local.get $27 call $~lib/rt/pure/__release - local.get $29 + local.get $31 call $~lib/rt/pure/__release - local.get $28 + local.get $32 call $~lib/rt/pure/__release local.get $33 call $~lib/rt/pure/__release - local.get $32 + local.get $28 call $~lib/rt/pure/__release - local.get $27 + local.get $29 call $~lib/rt/pure/__release - local.get $26 + local.get $36 call $~lib/rt/pure/__release - local.get $25 + local.get $37 call $~lib/rt/pure/__release - local.get $24 + local.get $38 call $~lib/rt/pure/__release - local.get $23 + local.get $39 call $~lib/rt/pure/__release - local.get $22 + local.get $40 call $~lib/rt/pure/__release - local.get $21 + local.get $41 call $~lib/rt/pure/__release - local.get $20 + local.get $42 call $~lib/rt/pure/__release - local.get $19 + local.get $43 call $~lib/rt/pure/__release - local.get $18 + local.get $44 call $~lib/rt/pure/__release - local.get $17 + local.get $45 call $~lib/rt/pure/__release - local.get $16 + local.get $46 call $~lib/rt/pure/__release - local.get $15 + local.get $47 call $~lib/rt/pure/__release - local.get $14 + local.get $48 call $~lib/rt/pure/__release - local.get $13 + local.get $49 call $~lib/rt/pure/__release - local.get $12 + local.get $50 call $~lib/rt/pure/__release - local.get $11 + local.get $51 call $~lib/rt/pure/__release - local.get $10 + local.get $52 call $~lib/rt/pure/__release - local.get $9 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $54 call $~lib/rt/pure/__release - local.get $7 + local.get $55 call $~lib/rt/pure/__release - local.get $6 + local.get $56 call $~lib/rt/pure/__release - local.get $5 + local.get $57 call $~lib/rt/pure/__release - local.get $4 + local.get $58 call $~lib/rt/pure/__release - local.get $1 + local.get $59 call $~lib/rt/pure/__release - local.get $3 + 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 global.get $std/array/arr i32.const 0 @@ -14178,17 +13626,17 @@ unreachable end loop $for-loop|0 - local.get $55 + local.get $5 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $55 + local.get $5 i32.const 1 i32.add - local.set $55 + local.set $5 br $for-loop|0 end end @@ -14205,56 +13653,54 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $59 + local.set $1 global.get $std/array/arr - local.tee $58 + local.tee $2 i32.load offset=12 - local.tee $57 + local.tee $5 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=4 - local.set $55 + local.set $4 loop $for-loop|043 - local.get $59 - local.get $57 - local.get $58 + local.get $1 + local.get $5 + local.get $2 i32.load offset=12 - local.tee $54 - local.get $57 - local.get $54 + local.tee $3 + local.get $5 + local.get $3 i32.lt_s select i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $59 + local.get $1 i32.const 2 i32.shl - local.tee $54 - local.get $58 + local.tee $3 + local.get $2 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $41 - local.get $54 - local.get $55 + local.set $11 + local.get $3 + local.get $4 i32.add - local.get $41 + local.get $11 f32.store - local.get $59 + local.get $1 i32.const 1 i32.add - local.set $59 + local.set $1 br $for-loop|043 end end - local.get $1 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -14266,7 +13712,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -14375,12 +13821,12 @@ 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 26 call $~lib/array/Array#filter - local.tee $1 + local.tee $0 i32.load offset=12 i32.const 2 i32.ne @@ -14485,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 @@ -14794,85 +14240,200 @@ 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 - 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 2 i32.const 9 - i32.const 5328 + i32.const 5280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 - i32.const 0 - local.set $1 - i32.const 0 - local.get $59 - i32.load offset=12 - local.tee $55 - local.get $57 + local.tee $4 i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop + local.tee $3 i32.const 1 - local.get $57 - local.get $59 + 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 - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|00 + if + local.get $1 + f32.load offset=4 + local.tee $11 local.get $1 - local.get $55 + f32.load + local.tee $34 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 i32.lt_s if - local.get $59 local.get $1 - call $~lib/array/Array#__get - local.tee $41 - local.get $41 - f32.ne - if (result i32) - local.get $57 + 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 - call $~lib/array/Array#__get - local.tee $41 - local.get $41 - f32.ne - else - i32.const 0 + 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 - i32.eqz + 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 + i32.const 2 + i32.const 9 + i32.const 5328 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $7 + i32.const 0 + local.set $1 + block $folding-inner0 + local.get $4 + i32.load offset=12 + local.tee $2 + local.get $7 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + i32.const 1 + local.get $4 + local.get $7 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|001 + local.get $1 + local.get $2 + i32.lt_s if - i32.const 0 - local.get $59 - local.get $1 - call $~lib/array/Array#__get - local.get $57 + local.get $4 local.get $1 call $~lib/array/Array#__get + local.tee $11 + local.get $11 f32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop + if (result i32) + local.get $7 + local.get $1 + call $~lib/array/Array#__get + local.tee $11 + local.get $11 + f32.ne + else + i32.const 0 + end + i32.eqz + if + local.get $4 + local.get $1 + call $~lib/array/Array#__get + local.get $7 + local.get $1 + call $~lib/array/Array#__get + f32.ne + br_if $folding-inner0 + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|001 end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|00 end + i32.const 1 + br $__inlined_func$std/array/isArraysEqual end - i32.const 1 + i32.const 0 end i32.eqz if @@ -14883,17 +14444,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 $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 @@ -14902,66 +14578,66 @@ i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $55 + local.set $2 i32.const 0 local.set $1 - i32.const 0 - local.get $58 - i32.load offset=12 - local.tee $52 - local.get $55 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - i32.const 1 - local.get $55 - local.get $58 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|01 - local.get $1 - local.get $52 - i32.lt_s - if - local.get $58 + 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 $2 + local.get $3 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|025 local.get $1 - call $~lib/array/Array#__get - local.tee $36 - local.get $36 - f64.ne - if (result i32) - local.get $55 - local.get $1 - call $~lib/array/Array#__get - local.tee $36 - local.get $36 - f64.ne - else - i32.const 0 - end - i32.eqz + local.get $5 + i32.lt_s if - i32.const 0 - local.get $58 - local.get $1 - call $~lib/array/Array#__get - local.get $55 + local.get $3 local.get $1 call $~lib/array/Array#__get + local.tee $17 + local.get $17 f64.ne - br_if $__inlined_func$std/array/isArraysEqual - drop + if (result i32) + local.get $2 + local.get $1 + call $~lib/array/Array#__get + local.tee $17 + local.get $17 + f64.ne + else + i32.const 0 + end + i32.eqz + if + local.get $3 + local.get $1 + call $~lib/array/Array#__get + local.get $2 + local.get $1 + call $~lib/array/Array#__get + f64.ne + br_if $folding-inner01 + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|025 end - local.get $1 - i32.const 1 - i32.add - local.set $1 - 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 @@ -14978,21 +14654,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 $18 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $54 + 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 $40 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15010,21 +14683,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 $19 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $52 + 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 $39 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15042,64 +14712,64 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $43 + 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 $53 + 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 $49 + 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 $1 + local.set $0 i32.const 64 call $std/array/createReverseOrderedArray - local.set $48 + local.set $8 i32.const 128 call $std/array/createReverseOrderedArray - local.set $46 + local.set $10 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $45 + local.set $13 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $44 + local.set $16 i32.const 512 call $std/array/createRandomOrderedArray - local.set $47 - local.get $43 + 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 $38 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15111,17 +14781,17 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $1 i32.const 48 call $std/array/assertSorted - local.get $53 + 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 $37 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15133,11 +14803,11 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $6 i32.const 48 call $std/array/assertSorted - local.get $49 - local.get $1 + local.get $6 + local.get $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15149,11 +14819,11 @@ call $~lib/builtins/abort unreachable end - local.get $48 + local.get $8 i32.const 48 call $std/array/assertSorted - local.get $48 - local.get $1 + local.get $8 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15165,11 +14835,11 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $46 - local.get $1 + local.get $10 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15181,11 +14851,11 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $45 - local.get $1 + local.get $13 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15197,11 +14867,11 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $44 - local.get $1 + local.get $16 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15213,82 +14883,82 @@ call $~lib/builtins/abort unreachable end - local.get $47 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $59 + local.get $4 call $~lib/rt/pure/__release - local.get $57 + local.get $7 call $~lib/rt/pure/__release - local.get $58 + local.get $3 call $~lib/rt/pure/__release - local.get $55 + local.get $2 call $~lib/rt/pure/__release - local.get $54 + local.get $18 call $~lib/rt/pure/__release - local.get $40 + local.get $21 call $~lib/rt/pure/__release - local.get $52 + local.get $19 call $~lib/rt/pure/__release - local.get $39 + local.get $22 call $~lib/rt/pure/__release - local.get $43 + local.get $20 call $~lib/rt/pure/__release - local.get $50 + local.get $5 call $~lib/rt/pure/__release - local.get $53 + local.get $1 call $~lib/rt/pure/__release - local.get $49 + local.get $6 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $48 + local.get $8 call $~lib/rt/pure/__release - local.get $46 + local.get $10 call $~lib/rt/pure/__release - local.get $45 + local.get $13 call $~lib/rt/pure/__release - local.get $44 + local.get $16 call $~lib/rt/pure/__release - local.get $47 + local.get $14 call $~lib/rt/pure/__release - local.get $38 + local.get $23 call $~lib/rt/pure/__release - local.get $37 + local.get $24 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 $2 + local.get $0 i32.const 49 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 50 call $std/array/assertSorted - local.get $59 + local.get $2 i32.const 51 call $std/array/assertSorted - local.get $59 + local.get $2 i32.const 52 call $std/array/assertSorted - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $59 + 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 @@ -15296,68 +14966,125 @@ i32.const 6080 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $59 + 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 $58 - i32.const 1 - global.set $~argumentsLength - local.get $59 - call $std/array/assertSorted<~lib/string/String | null>|trampoline + local.set $7 + block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) + i32.const 1 + local.set $1 + local.get $3 + i32.const 55 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $6 + loop $for-loop|03 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $1 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $5 + local.get $2 + local.get $1 + call $~lib/array/Array#__get + local.tee $4 + call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 + i32.const 0 + i32.gt_s + if + local.get $5 + 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 $5 + 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|03 + 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 $0 + call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 local.set $1 i32.const 0 - local.get $59 + local.get $3 i32.load offset=12 - local.tee $54 - local.get $58 + 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 $58 - local.get $59 + local.get $3 + local.get $7 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop - loop $for-loop|02 + loop $for-loop|04 local.get $1 - local.get $54 + local.get $5 i32.lt_s if - local.get $59 + local.get $3 local.get $1 call $~lib/array/Array#__get - local.tee $57 - local.get $58 + local.tee $0 + local.get $7 local.get $1 call $~lib/array/Array#__get - local.tee $55 + local.tee $2 call $~lib/string/String.__eq i32.eqz if - local.get $57 + local.get $0 call $~lib/rt/pure/__release - local.get $55 + local.get $2 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $57 + local.get $0 call $~lib/rt/pure/__release - local.get $55 + local.get $2 call $~lib/rt/pure/__release local.get $1 i32.const 1 i32.add local.set $1 - br $for-loop|02 + br $for-loop|04 end end i32.const 1 @@ -15371,18 +15098,155 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray + i32.const 0 + local.set $5 + 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 - i32.const 1 - global.set $~argumentsLength + 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|09 + 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 $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 $2 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $59 + local.get $3 call $~lib/rt/pure/__release - local.get $58 + local.get $7 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15390,13 +15254,12 @@ i32.const 6208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $59 - local.get $59 + local.tee $4 i32.const 6336 call $~lib/string/String.__eq i32.eqz @@ -15414,10 +15277,10 @@ i32.const 6384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $3 i32.const 6064 call $~lib/array/Array#join - local.tee $52 + local.tee $7 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15435,10 +15298,10 @@ i32.const 6480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $6 i32.const 6512 call $~lib/array/Array#join - local.tee $53 + local.tee $8 i32.const 6448 call $~lib/string/String.__eq i32.eqz @@ -15456,10 +15319,10 @@ i32.const 6544 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $10 i32.const 6576 call $~lib/array/Array#join - local.tee $48 + local.tee $13 i32.const 6608 call $~lib/string/String.__eq i32.eqz @@ -15477,14 +15340,12 @@ i32.const 6672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $2 i32.load offset=4 - local.get $59 + local.get $2 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $58 - local.set $46 - local.get $58 + local.tee $16 i32.const 7888 call $~lib/string/String.__eq i32.eqz @@ -15502,10 +15363,10 @@ i32.const 8016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $18 i32.const 6064 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $44 + local.tee $19 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15523,22 +15384,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $5 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 $5 call $~lib/array/Array#join - local.tee $43 + local.tee $20 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15556,19 +15417,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $1 i32.load offset=4 - local.tee $47 + local.tee $14 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $47 + local.get $14 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $57 + local.get $1 call $~lib/array/Array#join - local.tee $47 + local.tee $14 i32.const 8176 call $~lib/string/String.__eq i32.eqz @@ -15580,36 +15441,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release + local.get $4 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $52 + local.get $7 call $~lib/rt/pure/__release - local.get $50 + local.get $6 call $~lib/rt/pure/__release - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $49 + local.get $10 call $~lib/rt/pure/__release - local.get $48 + local.get $13 call $~lib/rt/pure/__release - local.get $59 + local.get $2 call $~lib/rt/pure/__release - local.get $46 + local.get $16 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 $58 + local.get $5 call $~lib/rt/pure/__release - local.get $43 + local.get $20 call $~lib/rt/pure/__release - local.get $57 + local.get $1 call $~lib/rt/pure/__release - local.get $47 + local.get $14 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15617,33 +15479,33 @@ i32.const 8256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $57 + 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 $55 + 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 $54 + 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 $52 - local.get $57 + 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 @@ -15655,12 +15517,12 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $4 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $45 - local.get $1 + local.tee $0 + local.set $18 + local.get $0 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15672,12 +15534,12 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $3 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $44 - local.get $1 + local.tee $0 + local.set $19 + local.get $0 i32.const 8368 call $~lib/string/String.__eq i32.eqz @@ -15689,12 +15551,12 @@ call $~lib/builtins/abort unreachable end - local.get $52 + local.get $7 i32.const 6304 call $~lib/array/Array#join - local.tee $1 - local.set $43 - local.get $1 + local.tee $0 + local.set $20 + local.get $0 i32.const 8400 call $~lib/string/String.__eq i32.eqz @@ -15712,14 +15574,14 @@ i32.const 8432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $6 i32.load offset=4 - local.get $50 + local.get $6 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $47 - local.get $1 + local.tee $0 + local.set $14 + local.get $0 i32.const 8464 call $~lib/string/String.__eq i32.eqz @@ -15737,14 +15599,14 @@ i32.const 8496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $8 i32.load offset=4 - local.get $53 + local.get $8 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $40 - local.get $1 + local.tee $0 + local.set $21 + local.get $0 i32.const 8528 call $~lib/string/String.__eq i32.eqz @@ -15762,14 +15624,14 @@ i32.const 8576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $10 i32.load offset=4 - local.get $49 + local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $39 - local.get $1 + local.tee $0 + local.set $22 + local.get $0 i32.const 8624 call $~lib/string/String.__eq i32.eqz @@ -15787,14 +15649,14 @@ i32.const 8688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $13 i32.load offset=4 - local.get $48 + local.get $13 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $1 - local.set $38 - local.get $1 + local.tee $0 + local.set $23 + local.get $0 i32.const 8736 call $~lib/string/String.__eq i32.eqz @@ -15812,12 +15674,12 @@ i32.const 8848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $24 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $1 - local.set $35 - local.get $1 + local.tee $0 + local.set $26 + local.get $0 i32.const 8896 call $~lib/string/String.__eq i32.eqz @@ -15835,12 +15697,12 @@ i32.const 9008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $27 i32.const 6304 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $1 - local.set $30 - local.get $1 + local.tee $0 + local.set $31 + local.get $0 i32.const 9040 call $~lib/string/String.__eq i32.eqz @@ -15858,9 +15720,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=4 - local.tee $59 + local.tee $2 i32.const 2 i32.const 2 i32.const 3 @@ -15868,7 +15730,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $59 + local.get $2 i32.const 2 i32.const 2 i32.const 3 @@ -15876,14 +15738,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $59 - local.set $29 - local.get $59 + local.tee $2 + local.set $32 + local.get $2 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15901,9 +15763,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $2 i32.load offset=4 - local.tee $58 + local.tee $5 i32.const 2 i32.const 0 i32.const 6 @@ -15911,7 +15773,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $58 + local.get $5 i32.const 2 i32.const 0 i32.const 6 @@ -15919,14 +15781,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $59 + local.get $2 i32.load offset=4 - local.get $59 + local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $58 - local.set $28 - local.get $58 + local.tee $5 + local.set $33 + local.get $5 i32.const 9136 call $~lib/string/String.__eq i32.eqz @@ -15944,7 +15806,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $5 i32.load offset=4 i32.const 1 i32.const 2 @@ -15952,7 +15814,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $29 i32.load offset=4 i32.const 1 i32.const 2 @@ -15961,16 +15823,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $32 + local.get $29 i32.store - local.get $58 + local.get $5 i32.load offset=4 - local.get $58 + local.get $5 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 $28 + local.set $29 + local.get $28 i32.const 7984 call $~lib/string/String.__eq i32.eqz @@ -15982,50 +15844,50 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $1 call $~lib/rt/pure/__release - local.get $55 + local.get $4 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $52 + local.get $7 call $~lib/rt/pure/__release 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 $50 + local.get $6 call $~lib/rt/pure/__release - local.get $47 + local.get $14 call $~lib/rt/pure/__release - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $40 + local.get $21 call $~lib/rt/pure/__release - local.get $49 + local.get $10 call $~lib/rt/pure/__release - local.get $39 + local.get $22 call $~lib/rt/pure/__release - local.get $48 + local.get $13 call $~lib/rt/pure/__release - local.get $38 + local.get $23 call $~lib/rt/pure/__release - local.get $37 + local.get $24 call $~lib/rt/pure/__release - local.get $35 + local.get $26 call $~lib/rt/pure/__release - local.get $34 + local.get $27 call $~lib/rt/pure/__release - local.get $30 + local.get $31 call $~lib/rt/pure/__release - local.get $29 + local.get $32 call $~lib/rt/pure/__release - local.get $28 + local.get $33 call $~lib/rt/pure/__release - local.get $32 + local.get $29 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -16035,9 +15897,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $3 i32.load offset=4 - local.tee $57 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -16045,7 +15907,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 @@ -16053,7 +15915,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 @@ -16061,7 +15923,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 @@ -16069,9 +15931,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $54 + local.get $3 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $52 + local.tee $7 i32.load offset=12 i32.const 10 i32.ne @@ -16084,14 +15946,14 @@ unreachable end loop $for-loop|1 - local.get $51 + local.get $12 i32.const 10 i32.lt_s if - local.get $52 - local.get $51 + local.get $7 + local.get $12 call $~lib/array/Array#__get - local.get $51 + local.get $12 i32.ne if i32.const 0 @@ -16101,10 +15963,10 @@ call $~lib/builtins/abort unreachable end - local.get $51 + local.get $12 i32.const 1 i32.add - local.set $51 + local.set $12 br $for-loop|1 end end @@ -16114,9 +15976,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $6 i32.load offset=4 - local.tee $51 + local.tee $1 i32.const 1 i32.const 2 i32.const 15 @@ -16124,7 +15986,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 @@ -16132,7 +15994,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 @@ -16140,7 +16002,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 @@ -16148,17 +16010,17 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $50 + local.get $6 call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#flat - local.set $57 + 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 $55 - local.get $57 + local.set $4 + local.get $1 i32.load offset=12 i32.const 8 i32.ne @@ -16171,21 +16033,21 @@ unreachable end i32.const 0 - local.set $51 + local.set $12 loop $for-loop|2 - local.get $51 - local.get $55 + local.get $12 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $57 - local.get $51 + local.get $1 + local.get $12 call $~lib/array/Array#__get - local.tee $53 - local.get $55 - local.get $51 + local.tee $8 + local.get $4 + local.get $12 call $~lib/array/Array#__get - local.tee $49 + local.tee $10 call $~lib/string/String.__eq i32.eqz if @@ -16196,14 +16058,14 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $49 + local.get $10 call $~lib/rt/pure/__release - local.get $51 + local.get $12 i32.const 1 i32.add - local.set $51 + local.set $12 br $for-loop|2 end end @@ -16213,9 +16075,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $12 i32.load offset=4 - local.tee $53 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 @@ -16223,7 +16085,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $53 + local.get $8 i32.const 0 i32.const 2 i32.const 3 @@ -16231,9 +16093,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $51 + local.get $12 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $53 + local.tee $8 i32.load offset=12 if i32.const 0 @@ -16243,33 +16105,33 @@ call $~lib/builtins/abort unreachable end - local.get $51 + local.get $12 call $~lib/rt/pure/__release - local.get $53 + local.get $8 call $~lib/rt/pure/__release - local.get $0 + local.get $9 call $~lib/rt/pure/__release - local.get $42 + local.get $25 call $~lib/rt/pure/__release - local.get $56 + local.get $15 call $~lib/rt/pure/__release - local.get $31 + local.get $30 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $59 + local.get $2 call $~lib/rt/pure/__release - local.get $58 + local.get $5 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $52 + local.get $7 call $~lib/rt/pure/__release - local.get $50 + local.get $6 call $~lib/rt/pure/__release - local.get $57 + local.get $1 call $~lib/rt/pure/__release - local.get $55 + local.get $4 call $~lib/rt/pure/__release ) (func $~start @@ -16287,10 +16149,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 @@ -16318,16 +16179,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -16337,44 +16195,44 @@ end unreachable end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.load offset=12 + local.get $0 + i32.load offset=20 + 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 - i32.load + 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 @@ -16404,7 +16262,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 3b85b4efd2..e7ad203e1f 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) @@ -634,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 @@ -1528,7 +1527,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,88 +1548,9 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $0 - i32.load - local.tee $4 - local.get $1 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $3 - 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.tee $1 local.get $0 - local.get $3 i32.load local.tee $4 i32.ne @@ -1641,20 +1561,19 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $3 + local.get $0 local.get $1 i32.store - local.get $3 local.get $0 + local.get $2 i32.store offset=4 + local.get $0 local.get $3 - local.get $2 i32.store offset=8 - local.get $3 + local.get $0 ) (func $~setArgumentsLength (param $0 i32) - local.get $0 - global.set $~argumentsLength + nop ) (func $start:std/arraybuffer (local $0 i32) @@ -1663,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 @@ -1671,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 @@ -1685,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 @@ -1703,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 @@ -1714,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 @@ -1734,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 @@ -1754,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 @@ -1774,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 @@ -1794,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 @@ -1815,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 @@ -1836,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 @@ -1855,7 +1779,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $7 i32.eqz if i32.const 0 @@ -1871,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 @@ -1879,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 @@ -1905,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 @@ -1958,16 +1936,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -1975,8 +1950,8 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load + local.get $0 + 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 79c3b3d506..f112291106 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 @@ -1122,29 +1122,29 @@ i32.const 0 i32.store8 local.get $2 + local.tee $1 i32.const 4 i32.add - local.tee $1 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 $1 i32.const 0 - i32.store8 offset=2 + i32.store8 offset=6 local.get $1 i32.const 0 - i32.store8 offset=1 - local.get $2 + i32.store8 offset=5 + local.get $1 i32.const 0 i32.store8 offset=3 local.get $1 i32.const 0 - i32.store8 + i32.store8 offset=4 local.get $0 i32.eqz if @@ -1164,8 +1164,6 @@ i32.const 0 i32.store offset=8 local.get $2 - local.set $1 - local.get $2 local.get $0 i32.load local.tee $3 @@ -1837,6 +1835,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -3385,12 +3384,14 @@ end local.get $1 i32.load - local.tee $2 - i32.const 0 - local.get $2 + local.tee $3 i32.const 16 i32.sub i32.load offset=12 + local.set $2 + local.get $3 + i32.const 0 + local.get $2 call $~lib/dataview/DataView#constructor local.set $2 local.get $0 @@ -3456,16 +3457,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index dcd5e509eb..93499c11aa 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 @@ -1598,7 +1596,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 +1606,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 +1654,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 +1726,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 +1779,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -1789,7 +1787,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 +1795,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 +1842,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -1865,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) @@ -1874,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 @@ -1903,13 +1901,13 @@ f64.mul local.tee $3 f64.mul - local.tee $2 - f64.sub local.tee $4 + f64.sub + local.tee $1 f64.const 1 - local.get $4 + local.get $1 f64.sub - local.get $2 + local.get $4 f64.sub local.get $3 local.get $3 @@ -1926,8 +1924,8 @@ local.get $3 local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul f64.const -2.7557314351390663e-07 local.get $3 @@ -1959,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 @@ -1986,9 +1984,9 @@ local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 - f64.sub local.tee $4 + f64.sub + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -2009,19 +2007,19 @@ local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $6 local.get $0 - local.get $2 + local.get $4 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -2042,26 +2040,26 @@ local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $0 - local.get $2 + local.get $4 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 $4 f64.sub global.set $~lib/math/rempio2_y1 local.get $3 @@ -2069,7 +2067,7 @@ 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,54 +2077,53 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 - global.get $~lib/math/rempio2_y1 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 $4 + local.get $1 + f64.const 0.00833333333332249 + local.get $0 f64.const -1.984126982985795e-04 - local.get $4 + 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 $7 - local.get $0 - local.get $4 - f64.const 0.5 - local.get $3 - f64.mul - local.get $4 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -2134,41 +2131,41 @@ else f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $2 + local.tee $0 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 $0 + local.get $0 f64.const 0.0416666666666666 - local.get $2 + local.get $0 f64.const -0.001388888888887411 - local.get $2 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $0 + local.get $0 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 $0 f64.const 2.087572321298175e-09 - local.get $2 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -2177,8 +2174,8 @@ f64.mul f64.add f64.mul - local.get $0 local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -3415,17 +3412,17 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 f64) + (local $10 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,20 +3477,20 @@ 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 @@ -3501,9 +3498,9 @@ i32.const 2147483647 i32.and local.tee $8 - local.get $14 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -3511,7 +3508,7 @@ return end i32.const 1 - local.get $20 + local.get $19 i32.const 0 local.get $8 i32.const 2146435072 @@ -3522,7 +3519,7 @@ 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,7 +3537,7 @@ f64.add return end - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -3568,14 +3565,14 @@ select local.get $9 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 + local.get $19 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u local.tee $9 i32.const 1 @@ -3584,7 +3581,7 @@ i32.const 0 local.get $5 local.get $9 - local.get $10 + local.get $11 i32.shl i32.eq select @@ -3594,14 +3591,14 @@ end local.set $5 end - local.get $20 + local.get $19 i32.eqz if local.get $8 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -3664,7 +3661,7 @@ i32.const 1071644672 i32.eq if - local.get $16 + local.get $15 i32.const 0 i32.ge_s if @@ -3677,7 +3674,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -3701,7 +3698,7 @@ i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -3733,8 +3730,8 @@ end end f64.const 1 - local.set $6 - local.get $16 + local.set $10 + local.get $15 i32.const 0 i32.lt_s if @@ -3755,7 +3752,7 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 end local.get $8 i32.const 1105199104 @@ -3794,12 +3791,12 @@ 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 @@ -3814,12 +3811,12 @@ 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 @@ -3862,9 +3859,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $0 - local.get $11 + local.get $6 local.get $2 f64.sub f64.sub @@ -3909,7 +3906,7 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else local.get $7 i32.const 1 @@ -3921,6 +3918,7 @@ local.set $4 end end + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3931,51 +3929,49 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $6 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 $6 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 +3986,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 +3994,7 @@ i32.or i32.const 524288 i32.add - local.get $17 + local.get $16 i32.const 18 i32.shl i32.add @@ -4009,8 +4005,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $12 + local.get $14 + local.get $6 local.get $0 local.get $3 f64.sub @@ -4019,8 +4015,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 +4026,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $12 + local.tee $6 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $6 f64.mul local.get $0 - local.get $12 + local.get $6 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 +4050,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,14 +4064,14 @@ 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 @@ -4087,14 +4083,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $3 - local.get $11 + local.get $6 local.get $0 f64.sub local.get $2 f64.sub - local.get $12 + local.get $20 f64.sub f64.sub end @@ -4107,7 +4103,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $11 + local.get $6 f64.mul local.get $1 local.get $2 @@ -4115,27 +4111,27 @@ f64.add local.tee $1 local.get $0 - local.get $11 + local.get $6 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 +4145,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,7 +4165,7 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and local.tee $9 @@ -4185,7 +4181,7 @@ i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 @@ -4223,7 +4219,7 @@ local.tee $7 i32.sub local.get $7 - local.get $10 + local.get $11 i32.const 0 i32.lt_s select @@ -4261,7 +4257,7 @@ local.get $3 f64.mul local.set $0 - local.get $6 + local.get $10 f64.const 1 local.get $3 local.get $3 @@ -4338,14 +4334,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 @@ -4378,8 +4374,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) @@ -4387,7 +4383,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 @@ -4409,38 +4405,36 @@ local.get $0 return end - f64.const 0.00833333333332249 + local.get $0 local.get $0 local.get $0 f64.mul - local.tee $2 + 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 $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.get $0 - local.get $2 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $2 - local.get $3 f64.mul f64.add f64.mul @@ -4457,7 +4451,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 @@ -4476,17 +4470,17 @@ 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 $2 + local.tee $4 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4499,27 +4493,27 @@ 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 $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $6 local.get $0 - local.get $2 + local.get $4 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4532,42 +4526,42 @@ 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 $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $0 - local.get $2 + local.get $4 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 $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 i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -4577,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 @@ -4586,41 +4580,41 @@ 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 $2 + local.tee $0 f64.mul - local.tee $3 + 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 $0 + local.get $0 f64.const 0.0416666666666666 - local.get $2 + local.get $0 f64.const -0.001388888888887411 - local.get $2 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $0 + local.get $0 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $0 f64.const 2.087572321298175e-09 - local.get $2 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -4629,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 $3 + local.get $1 + f64.const 0.00833333333332249 + local.get $0 f64.const -1.984126982985795e-04 - local.get $3 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $3 - f64.const 0.5 - local.get $4 - f64.mul - local.get $3 - 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 @@ -4962,30 +4955,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 @@ -4998,7 +4991,7 @@ call $~lib/math/tan_kern return end - local.get $3 + local.get $4 i32.const 2146435072 i32.ge_s if @@ -5008,36 +5001,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 @@ -5050,27 +5043,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 @@ -5083,54 +5076,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/map.optimized.wat b/tests/compiler/std/map.optimized.wat index c0d5921128..cf89502f7c 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 @@ -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 @@ -3311,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 @@ -3356,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 @@ -3387,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 @@ -3407,7 +3405,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -3600,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 @@ -4518,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 @@ -4563,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 @@ -4594,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 @@ -4614,7 +4612,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -4799,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 @@ -13072,16 +13070,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -13091,16 +13086,16 @@ end unreachable end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit - local.get $1 - i32.load offset=8 + local.get $0 + i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 481f3e626a..51f891ee93 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 @@ -2620,7 +2618,6 @@ local.set $7 local.get $5 i32.wrap_i64 - local.set $2 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -2659,7 +2656,6 @@ i32.const 2147483647 i32.and local.tee $7 - local.get $2 i32.or i32.eqz if @@ -3305,7 +3301,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 +3311,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 +3359,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 +3431,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 +3484,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -3496,7 +3492,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 +3500,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 +3547,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -3572,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) @@ -3581,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 @@ -3610,13 +3606,13 @@ f64.mul local.tee $3 f64.mul - local.tee $2 - f64.sub local.tee $4 + f64.sub + local.tee $1 f64.const 1 - local.get $4 + local.get $1 f64.sub - local.get $2 + local.get $4 f64.sub local.get $3 local.get $3 @@ -3633,8 +3629,8 @@ local.get $3 local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul f64.const -2.7557314351390663e-07 local.get $3 @@ -3666,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 @@ -3693,9 +3689,9 @@ local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $2 - f64.sub local.tee $4 + f64.sub + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3716,19 +3712,19 @@ local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $6 local.get $0 - local.get $2 + local.get $4 f64.sub - local.tee $4 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3749,26 +3745,26 @@ local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $0 - local.get $2 + local.get $4 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 $4 f64.sub global.set $~lib/math/rempio2_y1 local.get $3 @@ -3776,7 +3772,7 @@ 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 @@ -3786,54 +3782,53 @@ end local.set $6 global.get $~lib/math/rempio2_y0 - local.set $0 - global.get $~lib/math/rempio2_y1 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 $4 + local.get $1 + f64.const 0.00833333333332249 + local.get $0 f64.const -1.984126982985795e-04 - local.get $4 + 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 $7 - local.get $0 - local.get $4 - f64.const 0.5 - local.get $3 - f64.mul - local.get $4 - local.get $0 - f64.mul - local.tee $0 - local.get $7 f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub - local.get $0 + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3841,41 +3836,41 @@ else f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $3 + local.get $3 f64.mul - local.tee $2 + local.tee $0 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 $0 + local.get $0 f64.const 0.0416666666666666 - local.get $2 + local.get $0 f64.const -0.001388888888887411 - local.get $2 + local.get $0 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 $4 - local.get $4 + local.get $0 + local.get $0 + f64.mul + local.tee $1 + local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $0 f64.const 2.087572321298175e-09 - local.get $2 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3884,8 +3879,8 @@ f64.mul f64.add f64.mul - local.get $0 local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -7109,17 +7104,17 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 f64) + (local $10 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,20 +7169,20 @@ 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 @@ -7195,9 +7190,9 @@ i32.const 2147483647 i32.and local.tee $8 - local.get $14 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -7205,7 +7200,7 @@ return end i32.const 1 - local.get $20 + local.get $19 i32.const 0 local.get $8 i32.const 2146435072 @@ -7216,7 +7211,7 @@ 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,7 +7229,7 @@ f64.add return end - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -7262,14 +7257,14 @@ select local.get $9 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 + local.get $19 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u local.tee $9 i32.const 1 @@ -7278,7 +7273,7 @@ i32.const 0 local.get $5 local.get $9 - local.get $10 + local.get $11 i32.shl i32.eq select @@ -7288,14 +7283,14 @@ end local.set $5 end - local.get $20 + local.get $19 i32.eqz if local.get $8 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -7358,7 +7353,7 @@ i32.const 1071644672 i32.eq if - local.get $16 + local.get $15 i32.const 0 i32.ge_s if @@ -7371,7 +7366,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -7395,7 +7390,7 @@ i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -7427,8 +7422,8 @@ end end f64.const 1 - local.set $6 - local.get $16 + local.set $10 + local.get $15 i32.const 0 i32.lt_s if @@ -7449,7 +7444,7 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 end local.get $8 i32.const 1105199104 @@ -7488,12 +7483,12 @@ 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 @@ -7508,12 +7503,12 @@ 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 @@ -7556,9 +7551,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $0 - local.get $11 + local.get $6 local.get $2 f64.sub f64.sub @@ -7603,7 +7598,7 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else local.get $7 i32.const 1 @@ -7615,6 +7610,7 @@ local.set $4 end end + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7625,51 +7621,49 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $12 + local.tee $6 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 $6 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 +7678,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 +7686,7 @@ i32.or i32.const 524288 i32.add - local.get $17 + local.get $16 i32.const 18 i32.shl i32.add @@ -7703,8 +7697,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $12 + local.get $14 + local.get $6 local.get $0 local.get $3 f64.sub @@ -7713,8 +7707,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 +7718,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $12 + local.tee $6 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $6 f64.mul local.get $0 - local.get $12 + local.get $6 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 +7742,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,14 +7756,14 @@ 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 @@ -7781,14 +7775,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $3 - local.get $11 + local.get $6 local.get $0 f64.sub local.get $2 f64.sub - local.get $12 + local.get $20 f64.sub f64.sub end @@ -7801,7 +7795,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $11 + local.get $6 f64.mul local.get $1 local.get $2 @@ -7809,27 +7803,27 @@ f64.add local.tee $1 local.get $0 - local.get $11 + local.get $6 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 +7837,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,7 +7857,7 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and local.tee $9 @@ -7879,7 +7873,7 @@ i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 @@ -7917,7 +7911,7 @@ local.tee $7 i32.sub local.get $7 - local.get $10 + local.get $11 i32.const 0 i32.lt_s select @@ -7955,7 +7949,7 @@ local.get $3 f64.mul local.set $0 - local.get $6 + local.get $10 f64.const 1 local.get $3 local.get $3 @@ -8032,14 +8026,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 @@ -9019,8 +9013,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) @@ -9028,7 +9022,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 @@ -9050,38 +9044,36 @@ local.get $0 return end - f64.const 0.00833333333332249 + local.get $0 local.get $0 local.get $0 f64.mul - local.tee $2 + 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 $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.get $0 - local.get $2 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $2 - local.get $3 f64.mul f64.add f64.mul @@ -9098,7 +9090,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 @@ -9117,17 +9109,17 @@ 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 $2 + local.tee $4 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9140,27 +9132,27 @@ 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 $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $6 local.get $0 - local.get $2 + local.get $4 f64.sub - local.tee $3 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9173,42 +9165,42 @@ 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 $2 + local.tee $4 f64.sub local.tee $0 f64.sub - local.get $2 + local.get $4 f64.sub f64.sub - local.set $2 + local.set $4 local.get $0 - local.get $2 + local.get $4 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 $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 i32.const 0 - local.get $1 + local.get $2 call $~lib/math/pio2_large_quot local.tee $5 i32.sub @@ -9218,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 @@ -9227,41 +9219,41 @@ 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 $2 + local.tee $0 f64.mul - local.tee $3 + 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 $0 + local.get $0 f64.const 0.0416666666666666 - local.get $2 + local.get $0 f64.const -0.001388888888887411 - local.get $2 + local.get $0 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $0 + local.get $0 f64.mul - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $0 f64.const 2.087572321298175e-09 - local.get $2 + local.get $0 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -9270,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 $3 + local.get $1 + f64.const 0.00833333333332249 + local.get $0 f64.const -1.984126982985795e-04 - local.get $3 + local.get $0 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $0 + local.get $0 + local.get $0 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $0 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $7 - local.get $0 - local.get $3 - f64.const 0.5 - local.get $4 - f64.mul - local.get $3 - 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 @@ -10002,30 +9993,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 @@ -10038,7 +10029,7 @@ call $~lib/math/tan_kern return end - local.get $3 + local.get $4 i32.const 2146435072 i32.ge_s if @@ -10048,36 +10039,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 @@ -10090,27 +10081,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 @@ -10123,54 +10114,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 @@ -10650,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 @@ -10685,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 $5 + 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 $5 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $5 - local.get $5 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $5 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $3 - local.get $0 - local.get $5 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $5 - local.get $3 f64.mul f64.add f64.mul @@ -10727,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 $6 + local.tee $1 f64.const 1 - local.get $6 - 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 $6 - local.get $6 + 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 @@ -10776,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 @@ -10790,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 $6 + local.tee $4 f64.sub - local.tee $0 + local.tee $1 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10832,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 $6 - local.get $8 - local.get $3 + 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 @@ -10865,138 +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 $6 - local.get $3 - local.get $6 + 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 $6 + 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 - f64.const 0.00833333333332249 + local.set $6 global.get $~lib/math/rempio2_y0 + local.tee $4 + local.get $4 + f64.mul local.tee $0 - local.tee $5 - local.get $5 + local.get $4 f64.mul - local.tee $4 - f64.const -1.984126982985795e-04 + 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 $6 - local.get $5 - local.get $4 - f64.const 0.5 - global.get $~lib/math/rempio2_y1 - local.tee $9 - local.tee $3 - f64.mul - local.get $4 - local.get $5 - f64.mul - local.tee $1 - local.get $6 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 $6 - local.set $1 + local.tee $8 + local.set $0 f64.const 1 f64.const 0.5 - local.get $0 - local.get $0 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $2 f64.mul - local.tee $5 + local.tee $7 f64.sub - local.tee $3 + local.tee $9 f64.const 1 - local.get $3 + local.get $9 f64.sub - local.get $5 + 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 $3 - local.get $3 + 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 @@ -11005,38 +10991,38 @@ f64.mul f64.add f64.mul - local.get $0 - local.get $9 + 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 $6 + 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) 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 eb137632c3..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 @@ -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 @@ -898,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..1ccbff7645 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -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 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 a26498f6cf..fc82d12ebf 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -241,17 +241,17 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 f64) + (local $10 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,20 +306,20 @@ 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 @@ -327,9 +327,9 @@ i32.const 2147483647 i32.and local.tee $8 - local.get $14 + local.get $13 i32.wrap_i64 - local.tee $20 + local.tee $19 i32.or i32.eqz if @@ -337,7 +337,7 @@ return end i32.const 1 - local.get $20 + local.get $19 i32.const 0 local.get $8 i32.const 2146435072 @@ -348,7 +348,7 @@ 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,7 +366,7 @@ f64.add return end - local.get $16 + local.get $15 i32.const 0 i32.lt_s if @@ -394,14 +394,14 @@ select local.get $9 i32.sub - local.set $10 + local.set $11 i32.const 2 - local.get $20 + local.get $19 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $11 i32.shr_u local.tee $9 i32.const 1 @@ -410,7 +410,7 @@ 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 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -490,7 +490,7 @@ 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 @@ -527,7 +527,7 @@ i32.lt_s select local.set $2 - local.get $16 + local.get $15 i32.const 0 i32.lt_s if (result f64) @@ -559,8 +559,8 @@ end end f64.const 1 - local.set $6 - local.get $16 + local.set $10 + local.get $15 i32.const 0 i32.lt_s if @@ -581,7 +581,7 @@ i32.const 1 i32.eq select - local.set $6 + local.set $10 end local.get $8 i32.const 1105199104 @@ -620,12 +620,12 @@ 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 @@ -640,12 +640,12 @@ 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 @@ -688,9 +688,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $0 - local.get $11 + local.get $6 local.get $2 f64.sub f64.sub @@ -735,7 +735,7 @@ i32.lt_s if i32.const 1 - local.set $17 + local.set $16 else local.get $7 i32.const 1 @@ -747,6 +747,7 @@ 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 $6 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 $6 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 $6 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 $6 f64.mul local.tee $2 local.get $3 - local.get $12 + local.get $6 f64.mul local.get $0 - local.get $12 + local.get $6 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,14 +893,14 @@ 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 @@ -913,14 +912,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $11 + local.set $6 local.get $3 - local.get $11 + local.get $6 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 $6 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 $6 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,7 +994,7 @@ select br_if $folding-inner1 end - local.get $10 + local.get $11 i32.const 2147483647 i32.and local.tee $9 @@ -1011,7 +1010,7 @@ i32.gt_s if i32.const 1048575 - local.get $10 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 @@ -1049,7 +1048,7 @@ local.tee $7 i32.sub local.get $7 - local.get $10 + local.get $11 i32.const 0 i32.lt_s select @@ -1087,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 @@ -1164,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 @@ -2121,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 @@ -2157,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 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 81df92c34f..e895d0b7da 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 @@ -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 @@ -2080,11 +2078,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 +2093,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 +2115,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 +2157,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 @@ -2192,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 ) @@ -2844,11 +2841,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 +2856,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 +2878,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 +2920,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 @@ -2956,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 ) @@ -3699,12 +3695,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 +3714,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 +3736,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 +3778,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 +4465,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 +4484,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 +4506,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 +4548,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 +5331,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 +5350,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 +5372,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 +5414,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 +5854,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 +5873,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 +5895,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 +5937,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 +6698,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 +6717,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 +6739,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 +6781,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 +7223,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 +7242,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 +7264,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 +7306,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 +7957,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 +8018,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 +8038,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 +8069,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 +8785,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 +8846,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 +8866,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 +8897,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 @@ -9338,16 +9328,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -9357,16 +9344,16 @@ end unreachable end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit - local.get $1 - i32.load offset=8 + local.get $0 + i32.load offset=24 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 62ec0533db..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 @@ -1568,10 +1568,10 @@ (local $4 i32) local.get $0 i32.load offset=4 - local.tee $2 + 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 @@ -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 + local.get $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 + local.tee $3 if - local.get $4 + local.get $3 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 $4 i32.const -2147483648 i32.and if @@ -1665,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 @@ -1677,10 +1678,10 @@ unreachable end local.get $0 - local.get $1 + local.get $2 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2053158093..3968bce926 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 @@ -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 @@ -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 @@ -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 @@ -2346,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 @@ -2363,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 @@ -2377,7 +2375,7 @@ select if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add @@ -2388,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 @@ -2408,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 @@ -2419,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 @@ -2431,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 @@ -2459,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 $10 - local.get $6 + local.set $9 i32.const 0 - local.get $6 + local.get $5 local.tee $2 i32.const 30 i32.sub @@ -2472,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) @@ -2487,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 @@ -2507,7 +2505,7 @@ i32.ge_s i32.and if - local.get $0 + local.get $4 local.get $1 i32.const 2 i32.sub @@ -2573,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 @@ -2587,7 +2585,7 @@ end end i32.const 0 - local.get $10 + local.get $9 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop @@ -2602,13 +2600,13 @@ 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 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2626,7 +2624,7 @@ i32.ne i32.and if - local.get $0 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2704,8 +2702,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 @@ -2723,16 +2721,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 @@ -2753,18 +2751,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 @@ -2781,19 +2779,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 @@ -4860,16 +4858,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index faf09b32c3..0e16ace529 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 @@ -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) @@ -2404,10 +2402,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 @@ -2634,10 +2632,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 +2672,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 @@ -3180,16 +3176,13 @@ 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 + local.get $0 + 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 ce97927fe1..bd8abab68c 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 @@ -1187,10 +1185,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 @@ -2480,60 +2478,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 +2515,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 +2593,7 @@ i32.const 2 i32.sub local.set $1 - i32.const 2 + i32.const 8 br $break|1 end local.get $0 @@ -2603,91 +2604,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 +2691,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 +2728,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 +2806,7 @@ i32.const 2 i32.sub local.set $0 - i32.const 2 + i32.const 8 br $break|1 end local.get $5 @@ -2821,89 +2817,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 +2902,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 +2939,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 +3017,7 @@ i32.const 2 i32.sub local.set $0 - i32.const 2 + i32.const 8 br $break|1 end local.get $5 @@ -3037,91 +3028,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) @@ -4045,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) @@ -4403,10 +4382,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 +5280,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 +5334,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 +5349,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 +5389,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 @@ -6326,9 +6305,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 +6333,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -6382,9 +6361,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 +6389,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -6426,15 +6405,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 +6430,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 +6446,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 +6476,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 @@ -6551,9 +6529,9 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -6568,17 +6546,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $7 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 $7 i64.mul local.get $2 i64.const 4294967295 @@ -6607,7 +6582,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 @@ -6621,28 +6596,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $7 i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - local.get $6 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $10 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 + local.get $7 i64.mul - local.get $6 + local.get $5 i64.const 4294967295 i64.and i64.add @@ -6664,17 +6642,17 @@ 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 $7 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -6690,7 +6668,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -6704,13 +6682,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) @@ -14257,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 @@ -14288,16 +14265,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -14305,47 +14279,47 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.load offset=12 + local.get $0 + i32.load offset=20 + 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 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $1 - i32.load + 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 @@ -14375,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/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index f776553960..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 @@ -565,12 +565,12 @@ 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 @@ -579,73 +579,70 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + 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 $5 - 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.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $4 i32.load i32.store - local.get $3 local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $4 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 $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + 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 $4 - local.tee $2 local.get $0 i32.load - i32.ne drop local.get $0 - local.get $2 + local.get $5 i32.store local.get $0 local.get $1 @@ -654,7 +651,7 @@ i32.load offset=8 drop local.get $0 - local.get $5 + local.get $3 i32.store offset=8 local.get $0 local.get $6 @@ -834,12 +831,12 @@ 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 @@ -848,73 +845,70 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + 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 $5 - 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.get $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 local.get $2 + local.get $4 i32.load i32.store - local.get $3 local.get $2 + local.get $4 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $4 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 $8 i32.load i32.store offset=8 local.get $8 - local.get $3 + 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 $4 - local.tee $2 local.get $0 i32.load - i32.ne drop local.get $0 - local.get $2 + local.get $5 i32.store local.get $0 local.get $1 @@ -923,7 +917,7 @@ i32.load offset=8 drop local.get $0 - local.get $5 + local.get $3 i32.store offset=8 local.get $0 local.get $6 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 13a61da9ff..0d87d01bf5 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 @@ -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 @@ -3094,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 @@ -3102,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 @@ -3159,74 +3166,62 @@ (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) (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 +3229,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 +3243,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 +3251,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 +3265,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) @@ -3397,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) @@ -4292,10 +4296,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 @@ -7814,8 +7818,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 @@ -7825,8 +7829,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 @@ -7892,8 +7896,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 @@ -7903,8 +7907,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 @@ -7933,8 +7937,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 @@ -7944,8 +7948,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 @@ -7998,11 +8002,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 @@ -8012,8 +8016,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 @@ -8023,8 +8027,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 @@ -8091,8 +8095,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 @@ -8102,8 +8106,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 @@ -8133,8 +8137,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 @@ -8144,8 +8148,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 @@ -8419,31 +8423,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 +8439,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 +8453,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 +8633,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 +8649,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 +8663,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 +8899,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 +8925,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.get $1 - local.get $4 - i32.gt_s + local.set $1 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s select - local.get $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 +9177,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 +9203,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 +9593,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 +9619,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 +9859,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 +9885,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 +10072,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,29 +10098,47 @@ 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.get $1 - local.get $4 - i32.gt_s - select - local.get $4 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 + 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 - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10342,42 +10341,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 +10367,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> @@ -16668,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) @@ -17653,13 +17649,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 @@ -17869,13 +17866,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 @@ -18542,9 +18540,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 @@ -18570,7 +18568,7 @@ i32.const 43 local.get $2 select - i32.store16 + i32.store16 offset=4 local.get $0 i32.const 2 i32.add @@ -18598,9 +18596,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 @@ -18626,7 +18624,7 @@ i32.const 43 local.get $3 select - i32.store16 + i32.store16 offset=4 local.get $0 local.get $1 i32.add @@ -18642,15 +18640,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 @@ -18667,22 +18665,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 @@ -18690,14 +18681,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 @@ -18709,16 +18711,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 @@ -18767,9 +18764,9 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -18784,17 +18781,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $7 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 $7 i64.mul local.get $2 i64.const 4294967295 @@ -18823,7 +18817,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 @@ -18837,28 +18831,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $7 i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - local.get $6 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $10 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 + local.get $7 i64.mul - local.get $6 + local.get $5 i64.const 4294967295 i64.and i64.add @@ -18880,17 +18877,17 @@ 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 $7 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $5 i64.mul local.get $2 i64.const 4294967295 @@ -18906,7 +18903,7 @@ i64.shr_u i64.add local.get $2 - local.get $5 + local.get $7 i64.mul local.get $3 i64.const 4294967295 @@ -18920,13 +18917,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) @@ -19480,51 +19477,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 @@ -19534,34 +19533,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 @@ -19572,19 +19569,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) @@ -19680,49 +19677,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 @@ -19732,34 +19731,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 @@ -19770,19 +19767,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) @@ -22257,12 +22254,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 @@ -22276,13 +22272,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 @@ -22291,18 +22287,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 @@ -22784,12 +22777,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 @@ -22803,13 +22795,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 @@ -22818,18 +22810,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 @@ -24934,15 +24923,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 @@ -24956,13 +24944,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 @@ -24971,18 +24959,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 @@ -25365,15 +25350,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 @@ -25387,13 +25371,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 @@ -25402,17 +25386,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 @@ -26964,14 +26945,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 +26975,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 +26997,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 +27027,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 +27230,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 +27259,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 +27285,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 +27301,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 +27333,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 @@ -27652,29 +27633,29 @@ 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 + 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-inner0 + br_if $folding-inner2 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -27698,7 +27679,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27722,7 +27703,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27779,7 +27760,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -27836,7 +27817,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -27858,7 +27839,7 @@ call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27880,7 +27861,7 @@ call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27902,7 +27883,7 @@ call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27924,7 +27905,7 @@ call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -27977,7 +27958,7 @@ local.get $21 f32.const 6 f32.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 3 @@ -28032,7 +28013,7 @@ local.get $22 f64.const 6 f64.ne - br_if $folding-inner0 + br_if $folding-inner2 local.get $0 call $~lib/rt/pure/__release i32.const 3 @@ -28085,7 +28066,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner1 + br_if $folding-inner3 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -28109,7 +28090,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner1 + br_if $folding-inner3 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -28133,7 +28114,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner1 + br_if $folding-inner3 local.get $1 call $~lib/rt/pure/__release i32.const 3 @@ -28190,7 +28171,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner1 + br_if $folding-inner3 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -28247,7 +28228,7 @@ i32.and i32.const 6 i32.ne - br_if $folding-inner1 + br_if $folding-inner3 local.get $29 call $~lib/rt/pure/__release i32.const 3 @@ -28264,3707 +28245,3710 @@ 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 + 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.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 + 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 1 - i32.sub - local.set $0 - br $for-loop|07 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $21 + local.get $29 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $21 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end end - end - local.get $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 + 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 - 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 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + f64.const 0 + local.set $22 + local.get $1 + i32.load offset=4 + local.set $29 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|08 local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|08 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $22 + local.get $29 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $22 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end end - end - local.get $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 $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.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 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|09 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 + 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 - 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 $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.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 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|010 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.get $1 + local.get $25 + i32.add + i32.load8_u + local.tee $26 + local.get $26 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|010 + end end - end - 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 $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.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 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|011 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.get $1 + local.get $25 + i32.add + i32.load8_u + local.tee $26 + local.get $26 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|011 + end end - end - 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 $29 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 + 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 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 1 + i32.shl + local.tee $24 + i32.add + i32.load16_s + local.tee $23 + local.get $23 + i32.mul + local.set $23 + local.get $24 + local.get $28 + i32.add + local.get $23 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|012 + end end - end - 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 $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.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 + 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 1 - i32.add - local.set $1 - br $for-loop|013 + 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 - 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 $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.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 + 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 - i32.const 1 - i32.add - local.set $1 - br $for-loop|014 + 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 - 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 $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.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 + 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 - i32.const 1 - i32.add - local.set $1 - br $for-loop|015 + 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 - 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 $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.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 + 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 1 - i32.add - local.set $1 - br $for-loop|016 + 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 - 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 $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.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 + 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 1 - i32.add - local.set $1 - br $for-loop|017 + 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 - 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 $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.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 + 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 1 - i32.add - local.set $1 - br $for-loop|018 + 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 - 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 $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 - 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 + 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 - i32.const 1 - i32.add - local.set $1 - br $for-loop|019 + 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 - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $26 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner4 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 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-inner11 - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 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-inner11 - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 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-inner11 - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 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-inner11 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 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-inner11 - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 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-inner11 - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> - i32.const 1 - call $~lib/typedarray/Float64Array#constructor - local.tee $29 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $29 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 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-inner12 - 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 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $29 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $0 - i32.const 3008 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - 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 - 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-inner12 - 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 - 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-inner12 - 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 - 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-inner12 - 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 - 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-inner12 - 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 - 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-inner12 - 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 - 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-inner14 - 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 - 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-inner14 - 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 - 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 + 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-inner16 - 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-inner16 - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $26 - local.get $27 - i32.load offset=4 - local.set $24 - local.get $27 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $23 - loop $for-loop|027 + local.get $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-inner16 - 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 @@ -32052,28 +32036,28 @@ 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 @@ -32127,16 +32111,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1 @@ -32146,8 +32127,8 @@ end unreachable end - local.get $1 - i32.load + local.get $0 + i32.load offset=16 call $~lib/rt/pure/__visit end local.get $2 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/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 diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index fba2d7309d..e06717fa8a 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 @@ -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 @@ -1381,9 +1380,9 @@ local.tee $3 i64.const 4294967295 i64.and - local.set $6 + local.set $5 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -1398,17 +1397,14 @@ local.tee $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $7 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 $7 i64.mul local.get $2 i64.const 4294967295 @@ -1437,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 @@ -1451,28 +1447,31 @@ local.get $3 i64.const 32 i64.shr_u - local.tee $10 + local.tee $7 i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $10 local.get $5 - local.get $6 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $6 + local.get $10 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 + local.get $7 i64.mul - local.get $6 + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1494,17 +1493,17 @@ 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 $7 i64.mul - local.get $6 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 $5 + 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) @@ -1716,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 @@ -1789,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 @@ -1809,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 @@ -1829,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 @@ -1849,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 @@ -1869,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 @@ -1900,7 +1904,7 @@ call $~lib/wasi/index/abort unreachable end - local.get $6 + local.get $7 i32.const 16 i32.sub local.tee $0 @@ -1914,7 +1918,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 6937df9eb1..3336e8bdf4 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 @@ -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 @@ -1053,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 @@ -1153,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 @@ -1178,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 @@ -1214,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|04 + 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|04 end end - local.get $1 + local.get $3 if i32.const 0 i32.const 1040 @@ -1242,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 @@ -1259,7 +1257,7 @@ i32.const 1 i32.sub local.set $1 - br $while-continue|04 + br $while-continue|03 end end local.get $1 @@ -1285,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 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 @@ -1316,7 +1314,7 @@ br $while-continue|05 end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1353,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 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 @@ -1383,7 +1381,7 @@ end end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1459,16 +1457,13 @@ 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 + local.get $0 + i32.load offset=16 local.tee $1 if local.get $1