diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 107e3272ca..d67fe683cf 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -4,7 +4,7 @@ import { BLOCK_MAXSIZE } from "./rt/common"; import { COMPARATOR, SORT } from "./util/sort"; import { joinBooleanArray, joinIntegerArray, joinFloatArray, joinStringArray, joinReferenceArray } from "./util/string"; import { idof, isArray as builtin_isArray } from "./builtins"; -import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_ILLEGALGENTYPE, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; /** Ensures that the given array has _at least_ the specified backing size. */ function ensureSize(array: usize, minSize: usize, alignLog2: u32): void { @@ -367,7 +367,12 @@ export class Array { base + sizeof(), lastIndex << alignof() ); - store(base + (lastIndex << alignof()), changetype(0)); + if (isReference()) { + store(base + (lastIndex << alignof()), 0); + } else { + // @ts-ignore + store(base + (lastIndex << alignof()), 0); + } this.length_ = lastIndex; return element; // no need to retain -> is moved } @@ -496,7 +501,7 @@ export class Array { flat(): T { if (!isArray()) { - ERROR("Cannot call flat() on Array where T is not an Array."); + throw new TypeError(E_ILLEGALGENTYPE); } // Get the length and data start values var length = this.length_; diff --git a/std/assembly/util/error.ts b/std/assembly/util/error.ts index 20ce7f6d78..747067fc66 100644 --- a/std/assembly/util/error.ts +++ b/std/assembly/util/error.ts @@ -9,6 +9,10 @@ export const E_INDEXOUTOFRANGE: string = "Index out of range"; @lazy @inline export const E_INVALIDLENGTH: string = "Invalid length"; +// @ts-ignore: decorator +@lazy @inline +export const E_ILLEGALGENTYPE: string = "Illegal generic type"; + // @ts-ignore: decorator @lazy @inline export const E_EMPTYARRAY: string = "Array is empty"; diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 9499664b74..d0fb8cf3d5 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,9 +2,9 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) @@ -234,12 +234,14 @@ (data (i32.const 9952) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00\90%\00\00\d0%\00\00\00\00\00\00\f0%\00\000&\00\00P&\00\00p&\00\00\b0&") (data (i32.const 10004) "\01") (data (i32.const 10020) "\01") + (data (i32.const 10032) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00I\00l\00l\00e\00g\00a\00l\00 \00g\00e\00n\00e\00r\00i\00c\00 \00t\00y\00p\00e") (table $0 57 funcref) (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (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)) @@ -252,11 +254,93 @@ (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) + (global $std/array/ArrayU32 i32 (i32.const 26)) + (global $std/array/ArrayU8 i32 (i32.const 27)) + (global $std/array/ArrayStr i32 (i32.const 28)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (export "ArrayU32" (global $std/array/ArrayU32)) + (export "ArrayU32#constructor" (func $~lib/array/Array#constructor@varargs)) + (export "ArrayU32#get:length" (func $~lib/array/Array#get:length)) + (export "ArrayU32#set:length" (func $~lib/array/Array#set:length)) + (export "ArrayU32#every" (func $~lib/array/Array#every)) + (export "ArrayU32#findIndex" (func $~lib/array/Array#findIndex)) + (export "ArrayU32#fill" (func $~lib/array/Array#fill@varargs)) + (export "ArrayU32#includes" (func $~lib/array/Array#includes@varargs)) + (export "ArrayU32#indexOf" (func $~lib/array/Array#indexOf@varargs)) + (export "ArrayU32#lastIndexOf" (func $~lib/array/Array#lastIndexOf@varargs)) + (export "ArrayU32#push" (func $~lib/array/Array#push)) + (export "ArrayU32#concat" (func $~lib/array/Array#concat)) + (export "ArrayU32#copyWithin" (func $~lib/array/Array#copyWithin@varargs)) + (export "ArrayU32#pop" (func $~lib/array/Array#pop)) + (export "ArrayU32#forEach" (func $~lib/array/Array#forEach)) + (export "ArrayU32#filter" (func $~lib/array/Array#filter)) + (export "ArrayU32#shift" (func $~lib/array/Array#shift)) + (export "ArrayU32#some" (func $~lib/array/Array#some)) + (export "ArrayU32#unshift" (func $~lib/array/Array#unshift)) + (export "ArrayU32#slice" (func $~lib/array/Array#slice@varargs)) + (export "ArrayU32#splice" (func $~lib/array/Array#splice@varargs)) + (export "ArrayU32#reverse" (func $~lib/array/Array#reverse)) + (export "ArrayU32#sort" (func $~lib/array/Array#sort@varargs)) + (export "ArrayU32#join" (func $~lib/array/Array#join@varargs)) + (export "ArrayU32#flat" (func $~lib/array/Array#flat)) + (export "ArrayU32#toString" (func $~lib/array/Array#toString)) + (export "ArrayU8" (global $std/array/ArrayU8)) + (export "ArrayU8#constructor" (func $~lib/array/Array#constructor@varargs)) + (export "ArrayU8#get:length" (func $~lib/array/Array#get:length)) + (export "ArrayU8#set:length" (func $~lib/array/Array#set:length)) + (export "ArrayU8#every" (func $~lib/array/Array#every)) + (export "ArrayU8#findIndex" (func $~lib/array/Array#findIndex)) + (export "ArrayU8#fill" (func $~lib/array/Array#fill@varargs)) + (export "ArrayU8#includes" (func $~lib/array/Array#includes@varargs)) + (export "ArrayU8#indexOf" (func $~lib/array/Array#indexOf@varargs)) + (export "ArrayU8#lastIndexOf" (func $~lib/array/Array#lastIndexOf@varargs)) + (export "ArrayU8#push" (func $~lib/array/Array#push)) + (export "ArrayU8#concat" (func $~lib/array/Array#concat)) + (export "ArrayU8#copyWithin" (func $~lib/array/Array#copyWithin@varargs)) + (export "ArrayU8#pop" (func $~lib/array/Array#pop)) + (export "ArrayU8#forEach" (func $~lib/array/Array#forEach)) + (export "ArrayU8#filter" (func $~lib/array/Array#filter)) + (export "ArrayU8#shift" (func $~lib/array/Array#shift)) + (export "ArrayU8#some" (func $~lib/array/Array#some)) + (export "ArrayU8#unshift" (func $~lib/array/Array#unshift)) + (export "ArrayU8#slice" (func $~lib/array/Array#slice@varargs)) + (export "ArrayU8#splice" (func $~lib/array/Array#splice@varargs)) + (export "ArrayU8#reverse" (func $~lib/array/Array#reverse)) + (export "ArrayU8#sort" (func $~lib/array/Array#sort@varargs)) + (export "ArrayU8#join" (func $~lib/array/Array#join@varargs)) + (export "ArrayU8#flat" (func $~lib/array/Array#flat)) + (export "ArrayU8#toString" (func $~lib/array/Array#toString)) + (export "ArrayStr" (global $std/array/ArrayStr)) + (export "ArrayStr#constructor" (func $~lib/array/Array<~lib/string/String>#constructor@varargs)) + (export "ArrayStr#get:length" (func $~lib/array/Array#get:length)) + (export "ArrayStr#set:length" (func $~lib/array/Array#set:length)) + (export "ArrayStr#every" (func $~lib/array/Array#every)) + (export "ArrayStr#findIndex" (func $~lib/array/Array#findIndex)) + (export "ArrayStr#fill" (func $~lib/array/Array<~lib/string/String>#fill@varargs)) + (export "ArrayStr#includes" (func $~lib/array/Array<~lib/string/String>#includes@varargs)) + (export "ArrayStr#indexOf" (func $~lib/array/Array<~lib/string/String>#indexOf@varargs)) + (export "ArrayStr#lastIndexOf" (func $~lib/array/Array<~lib/string/String>#lastIndexOf@varargs)) + (export "ArrayStr#push" (func $~lib/array/Array<~lib/string/String>#push)) + (export "ArrayStr#concat" (func $~lib/array/Array<~lib/string/String>#concat)) + (export "ArrayStr#copyWithin" (func $~lib/array/Array<~lib/string/String>#copyWithin@varargs)) + (export "ArrayStr#pop" (func $~lib/array/Array<~lib/string/String>#pop)) + (export "ArrayStr#forEach" (func $~lib/array/Array#forEach)) + (export "ArrayStr#filter" (func $~lib/array/Array<~lib/string/String>#filter)) + (export "ArrayStr#shift" (func $~lib/array/Array<~lib/string/String>#shift)) + (export "ArrayStr#some" (func $~lib/array/Array#some)) + (export "ArrayStr#unshift" (func $~lib/array/Array<~lib/string/String>#unshift)) + (export "ArrayStr#slice" (func $~lib/array/Array<~lib/string/String>#slice@varargs)) + (export "ArrayStr#splice" (func $~lib/array/Array<~lib/string/String>#splice@varargs)) + (export "ArrayStr#reverse" (func $~lib/array/Array<~lib/string/String>#reverse)) + (export "ArrayStr#sort" (func $~lib/array/Array<~lib/string/String>#sort@varargs)) + (export "ArrayStr#join" (func $~lib/array/Array<~lib/string/String>#join@varargs)) + (export "ArrayStr#flat" (func $~lib/array/Array#flat)) + (export "ArrayStr#toString" (func $~lib/array/Array<~lib/string/String | null>#toString)) + (export "__setArgumentsLength" (func $~setArgumentsLength)) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 - i32.const 10032 + i32.const 10088 i32.gt_u if local.get $0 @@ -845,11 +929,11 @@ if unreachable end - i32.const 10032 + i32.const 10096 local.tee $0 i32.const 0 i32.store - i32.const 11600 + i32.const 11664 i32.const 0 i32.store loop $for-loop|0 @@ -860,7 +944,7 @@ local.get $1 i32.const 2 i32.shl - i32.const 10032 + i32.const 10096 i32.add i32.const 0 i32.store offset=4 @@ -878,7 +962,7 @@ i32.add i32.const 2 i32.shl - i32.const 10032 + i32.const 10096 i32.add i32.const 0 i32.store offset=96 @@ -896,13 +980,13 @@ br $for-loop|0 end end - i32.const 10032 - i32.const 11616 + i32.const 10096 + i32.const 11680 memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory - i32.const 10032 + i32.const 10096 global.set $~lib/rt/tlsf/ROOT end local.get $0 @@ -1460,7 +1544,7 @@ (local $1 i32) (local $2 i32) local.get $0 - i32.const 10032 + i32.const 10088 i32.gt_u if local.get $0 @@ -1876,6 +1960,10 @@ local.get $0 call $~lib/rt/pure/__retain ) + (func $~lib/array/Array#get:length (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -2273,7 +2361,7 @@ local.get $2 call $~lib/memory/memory.copy local.get $1 - i32.const 10032 + i32.const 10088 i32.ge_u if local.get $1 @@ -2285,20 +2373,21 @@ end local.get $3 ) - (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureSize (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 2 + local.tee $3 + local.get $2 i32.shr_u i32.gt_u if local.get $1 - i32.const 268435452 + i32.const 1073741808 + local.get $2 + i32.shr_u i32.gt_u if i32.const 1040 @@ -2310,27 +2399,27 @@ end local.get $0 i32.load - local.set $3 - local.get $2 + local.set $4 call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.get $4 call $~lib/rt/tlsf/checkUsedBlock local.get $1 - i32.const 2 + local.get $2 i32.shl - local.tee $4 + local.tee $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 + local.get $3 i32.add i32.const 0 - local.get $4 local.get $2 + local.get $3 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $3 + local.get $4 i32.ne if local.get $0 @@ -2341,32 +2430,34 @@ i32.store offset=4 end local.get $0 - local.get $4 + local.get $2 i32.store offset=8 end ) - (func $~lib/array/Array#push (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.add - local.tee $3 + local.tee $2 + i32.const 2 call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add local.get $1 i32.store local.get $0 - local.get $3 + local.get $2 i32.store offset=12 + local.get $2 ) (func $~lib/array/Array#pop (param $0 i32) (result i32) (local $1 i32) @@ -2398,6 +2489,52 @@ local.get $1 i32.store offset=12 ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $2 + local.get $1 + i32.gt_s + if + local.get $0 + i32.load offset=4 + local.tee $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $do-continue|0 + local.get $3 + i32.load + call $~lib/rt/pure/__release + local.get $3 + i32.const 4 + i32.add + local.tee $3 + local.get $2 + i32.lt_u + br_if $do-continue|0 + end + else + local.get $0 + local.get $1 + i32.const 2 + call $~lib/array/ensureSize + end + local.get $0 + local.get $1 + i32.store offset=12 + ) (func $~lib/array/Array#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -2560,7 +2697,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2569,6 +2706,7 @@ i32.const 1 i32.add local.tee $2 + i32.const 2 call $~lib/array/ensureSize local.get $0 i32.load offset=4 @@ -2588,6 +2726,100 @@ local.get $0 local.get $2 i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $4 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $while-continue|0 + local.get $2 + local.get $1 + i32.lt_u + if + local.get $2 + i32.load + local.set $3 + local.get $2 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $3 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain ) (func $~lib/array/Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2994,6 +3226,7 @@ i32.const 1 i32.add local.tee $3 + i32.const 2 call $~lib/array/ensureSize local.get $0 local.get $3 @@ -3038,7 +3271,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3072,6 +3306,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $1 call $~lib/rt/pure/__release local.get $0 @@ -3121,7 +3356,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3151,6 +3387,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $1 call $~lib/rt/pure/__release local.get $0 @@ -3205,7 +3442,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3234,6 +3472,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $1 call $~lib/rt/pure/__release local.get $0 @@ -3292,7 +3531,8 @@ i32.shl i32.add i32.load - local.tee $3 + i32.const 3 + global.set $~argumentsLength local.get $2 local.get $0 local.get $1 @@ -3311,6 +3551,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $0 global.get $std/array/i i32.add @@ -3366,6 +3607,7 @@ i32.const 100 i32.add call $~lib/array/Array#push + drop local.get $3 i32.const 1 i32.add @@ -3402,6 +3644,7 @@ i32.const 200 i32.add call $~lib/array/Array#push + drop local.get $3 i32.const 1 i32.add @@ -3460,6 +3703,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $0 global.get $std/array/i i32.add @@ -3507,6 +3751,8 @@ i32.add i32.load local.set $7 + i32.const 3 + global.set $~argumentsLength local.get $3 local.get $6 i32.add @@ -3588,7 +3834,10 @@ i32.shl i32.add i32.load - local.tee $3 + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 local.get $0 local.get $1 @@ -3597,6 +3846,7 @@ local.get $4 local.get $3 call $~lib/array/Array#push + drop end local.get $2 i32.const 1 @@ -3613,6 +3863,7 @@ local.tee $1 i32.const 100 call $~lib/array/Array#push + drop local.get $0 global.get $std/array/i i32.add @@ -3675,7 +3926,6 @@ select i32.lt_s if - local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3683,7 +3933,11 @@ i32.shl i32.add i32.load - local.tee $4 + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $3 local.get $0 local.get $1 @@ -3720,6 +3974,7 @@ local.tee $2 i32.const 1 call $~lib/array/Array#push + drop local.get $2 call $~lib/rt/pure/__release local.get $0 @@ -3751,7 +4006,6 @@ i32.const 0 i32.ge_s if - local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -3759,6 +4013,11 @@ i32.shl i32.add i32.load + local.set $4 + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $3 local.get $0 local.get $1 @@ -3871,48 +4130,126 @@ unreachable end ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) - (local $5 i32) - (local $6 f32) - (local $7 i32) - local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - local.tee $2 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $5 - i32.const 0 - local.get $2 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 - i32.sub - local.set $3 + (local $5 f32) + (local $6 i32) loop $for-loop|0 - local.get $3 - i32.const 0 - i32.gt_s + local.get $6 + local.get $1 + i32.lt_s if - local.get $3 - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 1 - i32.and - local.get $5 - local.get $2 - i32.const 6 - i32.shr_u - i32.const 2 - i32.shl + local.get $0 + local.get $6 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $5 + local.get $6 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $3 + local.tee $2 + i32.const 1 + i32.sub + local.set $3 + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + f32.store + br $while-continue|1 + end + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $5 + f32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + ) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f32) + (local $5 i32) + (local $6 f32) + (local $7 i32) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $5 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $3 + loop $for-loop|0 + local.get $3 + i32.const 0 + i32.gt_s + if + local.get $3 + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 1 + i32.and + local.get $5 + local.get $2 + i32.const 6 + i32.shr_u + i32.const 2 + i32.shl i32.add i32.load local.get $2 @@ -3941,14 +4278,18 @@ i32.shl i32.add f32.load - local.tee $4 + local.set $4 local.get $0 local.get $3 i32.const 2 i32.shl i32.add f32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4053,14 +4394,18 @@ if local.get $0 f32.load - local.tee $4 + local.set $4 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4228,6 +4573,84 @@ call $~lib/rt/pure/__release i32.const 1 ) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + (local $6 i32) + loop $for-loop|0 + local.get $6 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + local.get $6 + i32.const 1 + i32.sub + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $5 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $3 + local.tee $2 + i32.const 1 + i32.sub + local.set $3 + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store + br $while-continue|1 + end + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -4298,14 +4721,18 @@ i32.shl i32.add f64.load - local.tee $4 + local.set $4 local.get $0 local.get $3 i32.const 3 i32.shl i32.add f64.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4410,14 +4837,18 @@ if local.get $0 f64.load - local.tee $4 + local.set $4 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $6 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s @@ -4606,53 +5037,132 @@ call $~lib/rt/pure/__release i32.const 1 ) - (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - local.get $1 - i32.const 31 - i32.add - i32.const 5 - i32.shr_u - i32.const 2 - i32.shl - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $5 - i32.const 0 - local.get $3 - call $~lib/memory/memory.fill - local.get $1 - i32.const 1 - i32.sub - local.set $4 loop $for-loop|0 - local.get $4 - i32.const 0 - i32.gt_s + local.get $7 + local.get $1 + i32.lt_s if - local.get $4 - local.set $3 + 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 $3 - i32.const 1 - i32.and - local.get $5 - local.get $3 - i32.const 6 - i32.shr_u - i32.const 2 - i32.shl - i32.add - i32.load - local.get $3 - i32.const 1 - i32.shr_s + 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) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $5 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|0 + local.get $4 + i32.const 0 + i32.gt_s + if + local.get $4 + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 1 + i32.and + local.get $5 + local.get $3 + i32.const 6 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + i32.const 1 + i32.shr_s i32.const 31 i32.and i32.shr_u @@ -4676,14 +5186,18 @@ i32.shl i32.add i32.load - local.tee $3 + local.set $3 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4789,14 +5303,18 @@ if local.get $0 i32.load - local.tee $3 + local.set $3 local.get $0 local.get $1 i32.const 2 i32.shl i32.add i32.load - local.tee $6 + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -4863,10 +5381,6 @@ (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 @@ -4879,26 +5393,30 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $4 local.get $3 i32.const 2 i32.eq if - local.get $2 + local.get $4 i32.load offset=4 - local.tee $3 - local.get $2 + local.set $3 + local.get $4 i32.load - local.tee $5 + local.set $2 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $2 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 $2 + local.get $4 local.get $3 i32.store end @@ -4907,84 +5425,17 @@ return end local.get $3 + local.tee $2 i32.const 256 i32.lt_s if - local.get $3 - local.set $5 + local.get $4 + local.get $2 local.get $1 - 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 + call $~lib/util/sort/insertionSort else + local.get $4 local.get $2 - local.get $3 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -5005,6 +5456,22 @@ i32.lt_u i32.sub ) + (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 47 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#sort + ) (func $std/array/createReverseOrderedArray (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -5135,6 +5602,8 @@ local.get $0 local.get $2 call $~lib/array/Array#__get + i32.const 2 + global.set $~argumentsLength local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5210,6 +5679,7 @@ i32.const 1 i32.add local.tee $3 + i32.const 2 call $~lib/array/ensureSize local.get $0 local.get $3 @@ -5372,7 +5842,6 @@ i32.ge_s if block $while-break|1 - local.get $6 local.get $0 local.get $3 i32.const 2 @@ -5380,7 +5849,11 @@ i32.add i32.load call $~lib/rt/pure/__retain - local.tee $5 + 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 @@ -5453,11 +5926,15 @@ local.get $3 i32.load offset=4 call $~lib/rt/pure/__retain - local.tee $2 + local.set $2 local.get $3 i32.load call $~lib/rt/pure/__retain - local.tee $4 + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $2 + local.get $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5515,11 +5992,15 @@ i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $3 + local.set $3 local.get $0 local.get $2 call $~lib/array/Array#__get - local.tee $4 + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 @@ -5982,23 +6463,98 @@ call $~lib/rt/pure/__release i32.const 1 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - block $__inlined_func$~lib/string/String#concat (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 6176 - local.get $2 - select - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $5 + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 268435452 + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $3 + i32.const 0 + local.get $5 + call $~lib/memory/memory.fill + local.get $3 + local.set $2 + local.get $3 + local.get $0 + i32.load + local.tee $4 + 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 $3 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + block $__inlined_func$~lib/string/String#concat (result i32) + local.get $0 + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 6176 + local.get $2 + select + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $5 call $~lib/rt/pure/__retain local.tee $0 i32.eqz @@ -9141,6 +9697,11 @@ call $~lib/rt/pure/__release local.get $1 ) + (func $~lib/array/Array<~lib/string/String | null>#toString (param $0 i32) (result i32) + local.get $0 + i32.const 6304 + call $~lib/array/Array<~lib/string/String | null>#join + ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9466,16 +10027,24 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array#toString (param $0 i32) (result i32) + (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 - i32.const 6304 + local.get $1 call $~lib/util/string/joinIntegerArray - i32.const 6304 + local.get $1 call $~lib/rt/pure/__release ) + (func $~lib/array/Array#toString (param $0 i32) (result i32) + local.get $0 + i32.const 6304 + call $~lib/array/Array#join + ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9514,7 +10083,8 @@ local.get $4 if (result i32) local.get $4 - call $~lib/array/Array#toString + i32.const 6304 + call $~lib/array/Array#join else i32.const 6064 end @@ -9553,11 +10123,13 @@ end local.get $3 if + local.get $3 + i32.const 6304 + call $~lib/array/Array#join + local.tee $2 local.get $1 local.get $1 - local.get $3 - call $~lib/array/Array#toString - local.tee $7 + local.get $2 call $~lib/string/String.__concat local.tee $9 local.tee $2 @@ -9569,7 +10141,6 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $7 call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release @@ -9621,13 +10192,15 @@ end local.get $2 if - local.get $1 - local.get $1 local.get $2 - call $~lib/array/Array#toString + i32.const 6304 + call $~lib/array/Array#join local.tee $0 + local.get $1 + local.get $1 + local.get $0 call $~lib/string/String.__concat - local.tee $4 + local.tee $0 local.tee $3 i32.ne if @@ -9637,9 +10210,8 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release local.get $3 local.set $1 @@ -9650,6 +10222,11 @@ call $~lib/rt/pure/__release local.get $1 ) + (func $~lib/array/Array#toString (param $0 i32) (result i32) + local.get $0 + i32.const 6304 + call $~lib/array/Array#join + ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -10260,14 +10837,14 @@ (local $17 i32) (local $18 i32) (local $19 i32) - (local $20 f32) + (local $20 i32) (local $21 i32) (local $22 i32) (local $23 i32) - (local $24 f64) + (local $24 i32) (local $25 i32) - (local $26 i32) - (local $27 i32) + (local $26 f32) + (local $27 f64) (local $28 i32) (local $29 i32) (local $30 i32) @@ -10686,6 +11263,7 @@ global.get $std/array/arr i32.const 42 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get @@ -10760,6 +11338,7 @@ global.get $std/array/arr i32.const 43 call $~lib/array/Array#push + drop global.get $std/array/arr i32.load offset=12 i32.const 1 @@ -10800,6 +11379,7 @@ global.get $std/array/arr i32.const 44 call $~lib/array/Array#push + drop global.get $std/array/arr i32.load offset=12 i32.const 2 @@ -10853,6 +11433,7 @@ global.get $std/array/arr i32.const 45 call $~lib/array/Array#push + drop global.get $std/array/arr i32.load offset=12 i32.const 3 @@ -10933,39 +11514,8 @@ call $std/array/Ref#constructor i32.store offset=4 local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $1 - loop $do-continue|0 - local.get $2 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.const 4 - i32.add - local.tee $2 - local.get $1 - i32.lt_u - br_if $do-continue|0 - end - else - local.get $0 - i32.const 0 - call $~lib/array/ensureSize - end - local.get $0 i32.const 0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $0 i32.load offset=12 if @@ -11085,9 +11635,11 @@ local.get $1 i32.const 46 call $~lib/array/Array#push + drop local.get $1 i32.const 47 call $~lib/array/Array#push + drop global.get $std/array/arr local.get $1 call $~lib/array/Array#concat @@ -11268,7 +11820,7 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.const 3 i32.const 2147483647 @@ -11298,10 +11850,10 @@ i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 i32.const 3 i32.const 2147483647 @@ -11331,22 +11883,21 @@ i32.const 2256 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $13 + 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 $25 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11435,14 +11986,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $28 + local.tee $12 i32.const 5 i32.const 2 i32.const 3 i32.const 2592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11467,7 +12018,7 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $28 i32.const 5 i32.const 2 i32.const 3 @@ -11531,14 +12082,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $12 + 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 $21 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11556,9 +12107,10 @@ i32.const 2928 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 -4 i32.const -3 i32.const -2 @@ -11570,7 +12122,7 @@ i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11588,22 +12140,22 @@ i32.const 3024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $23 + local.tee $22 i32.const 5 i32.const 2 i32.const 3 i32.const 3072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11621,22 +12173,22 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11648,7 +12200,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -11658,9 +12210,9 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $13 + local.get $15 call $~lib/rt/pure/__release - local.get $25 + local.get $23 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release @@ -11670,11 +12222,11 @@ call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $28 + local.get $12 call $~lib/rt/pure/__release - local.get $14 + local.get $13 call $~lib/rt/pure/__release - local.get $15 + local.get $28 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release @@ -11682,25 +12234,26 @@ call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $21 + local.get $20 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $22 + local.get $21 call $~lib/rt/pure/__release - local.get $23 + local.get $22 call $~lib/rt/pure/__release - local.get $26 + local.get $24 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $27 + local.get $25 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift + drop global.get $std/array/arr i32.load offset=12 i32.const 4 @@ -11780,6 +12333,7 @@ global.get $std/array/arr i32.const 41 call $~lib/array/Array#unshift + drop global.get $std/array/arr i32.load offset=12 i32.const 5 @@ -11870,57 +12424,21 @@ unreachable end global.get $std/array/arr - local.tee $1 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.lt_s + call $~lib/array/Array#shift + global.set $std/array/i + global.get $std/array/i + i32.const 41 + i32.ne if - i32.const 1984 - i32.const 1088 - i32.const 361 - i32.const 21 + i32.const 0 + i32.const 1296 + i32.const 246 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.tee $0 - i32.load - local.get $0 - local.get $0 - i32.const 4 - i32.add - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 2 - i32.shl - local.tee $4 - call $~lib/memory/memory.copy - local.get $0 - local.get $4 - i32.add - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.store offset=12 - global.set $std/array/i - global.get $std/array/i - i32.const 41 - i32.ne - if - i32.const 0 - i32.const 1296 - i32.const 246 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.load offset=12 + global.get $std/array/arr + i32.load offset=12 i32.const 4 i32.ne if @@ -12073,49 +12591,8 @@ unreachable end global.get $std/array/arr - local.tee $1 - i32.load offset=12 - local.tee $2 - if - local.get $1 - i32.load offset=4 - local.set $0 - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - i32.add - local.set $2 - loop $while-continue|0 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load - local.set $1 - local.get $0 - local.get $2 - i32.load - i32.store - local.get $2 - local.get $1 - i32.store - local.get $0 - i32.const 4 - i32.add - local.set $0 - local.get $2 - i32.const 4 - i32.sub - local.set $2 - br $while-continue|0 - end - end - end + call $~lib/array/Array#reverse + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 i32.const 3 @@ -12182,9 +12659,11 @@ global.get $std/array/arr i32.const 43 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 44 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 44 i32.const 0 @@ -12372,7 +12851,7 @@ local.get $4 i32.load offset=4 local.set $3 - loop $while-continue|019 + loop $while-continue|0 local.get $0 local.get $2 i32.lt_s @@ -12390,7 +12869,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|019 + br $while-continue|0 end end i32.const -1 @@ -12436,7 +12915,7 @@ local.get $9 i32.load offset=4 local.set $4 - loop $while-continue|020 + loop $while-continue|019 local.get $0 local.get $3 i32.lt_s @@ -12454,7 +12933,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|020 + br $while-continue|019 end end i32.const -1 @@ -12621,24 +13100,24 @@ i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=12 local.tee $2 + i32.load offset=12 + local.tee $3 if (result i32) i32.const 0 - local.get $2 + local.get $3 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $2 i32.load offset=4 local.set $9 - loop $while-continue|021 + loop $while-continue|020 local.get $0 - local.get $2 + local.get $3 i32.lt_s if i32.const 1 @@ -12648,14 +13127,14 @@ i32.shl i32.add f32.load - local.tee $20 + local.tee $26 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $20 - local.get $20 + local.get $26 + local.get $26 f32.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -12664,7 +13143,7 @@ i32.const 1 i32.add local.set $0 - br $while-continue|021 + br $while-continue|020 end end i32.const 0 @@ -12680,7 +13159,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $2 + local.set $0 i32.const 0 i32.const 1 i32.const 3 @@ -12688,7 +13167,7 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.load offset=12 local.tee $4 if (result i32) @@ -12700,38 +13179,38 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $3 i32.load offset=4 - local.set $13 - loop $while-continue|022 - local.get $2 + local.set $15 + loop $while-continue|021 + local.get $0 local.get $4 i32.lt_s if i32.const 1 - local.get $13 - local.get $2 + local.get $15 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $24 + local.tee $27 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $24 - local.get $24 + local.get $27 + local.get $27 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 - br $while-continue|022 + local.set $0 + br $while-continue|021 end end i32.const 0 @@ -12800,9 +13279,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12916,14 +13395,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $14 + local.tee $12 i32.const 3 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12960,10 +13439,10 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $2 local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 2 i32.const 2 call $~lib/array/Array#splice @@ -12986,14 +13465,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 2 i32.const 3 i32.const 3760 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13011,13 +13490,14 @@ i32.const 3792 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 0 i32.const 1 call $~lib/array/Array#splice - local.tee $21 + local.tee $20 i32.const 1 i32.const 2 i32.const 3 @@ -13043,7 +13523,7 @@ i32.const 3872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13067,14 +13547,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $23 + local.tee $22 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13093,7 +13573,7 @@ i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13361,10 +13841,9 @@ i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.tee $0 i32.const 4 i32.const 0 call $~lib/array/Array#splice @@ -13387,7 +13866,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 @@ -13412,10 +13891,10 @@ i32.const 4688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 7 i32.const 0 call $~lib/array/Array#splice @@ -13438,7 +13917,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 @@ -13463,10 +13942,10 @@ i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $2 local.get $1 + call $~lib/rt/pure/__release + local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice @@ -13489,7 +13968,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 3 @@ -13514,10 +13993,10 @@ i32.const 4912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $13 + local.tee $15 i32.load offset=12 if i32.const 0 @@ -13527,7 +14006,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 if i32.const 0 @@ -13565,15 +14044,15 @@ i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $9 i32.const 2 call $~lib/array/Array#splice - local.set $25 - local.get $13 + local.set $23 + local.get $15 call $~lib/rt/pure/__release - local.get $25 + local.get $23 i32.load offset=12 i32.const 2 i32.ne @@ -13585,7 +14064,7 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $23 i32.const 0 call $~lib/array/Array#__get local.tee $55 @@ -13600,7 +14079,7 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $23 i32.const 1 call $~lib/array/Array#__get local.tee $56 @@ -13678,7 +14157,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.load offset=4 local.tee $0 i32.const 1 @@ -13691,7 +14170,7 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $13 + local.get $15 call $~lib/array/Array#splice local.tee $28 i32.load offset=12 @@ -13730,7 +14209,7 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $15 i32.load offset=12 i32.const 2 i32.ne @@ -13742,7 +14221,7 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $15 i32.const 0 call $~lib/array/Array#__get local.tee $60 @@ -13754,11 +14233,11 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $15 i32.const 1 call $~lib/array/Array#__get - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -13779,7 +14258,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -13793,9 +14272,9 @@ call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $12 call $~lib/rt/pure/__release - local.get $15 + local.get $13 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release @@ -13803,19 +14282,19 @@ call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $21 + local.get $20 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $22 + local.get $21 call $~lib/rt/pure/__release - local.get $23 + local.get $22 call $~lib/rt/pure/__release - local.get $26 + local.get $24 call $~lib/rt/pure/__release - local.get $27 + local.get $25 call $~lib/rt/pure/__release local.get $29 call $~lib/rt/pure/__release @@ -13879,7 +14358,7 @@ call $~lib/rt/pure/__release local.get $60 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -14024,9 +14503,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 7 call $~lib/array/Array#every @@ -14127,9 +14608,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 12 call $~lib/array/Array#some @@ -14228,9 +14711,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop i32.const 0 global.set $std/array/i global.get $std/array/arr @@ -14334,9 +14819,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 21 call $~lib/array/Array#forEach @@ -14370,15 +14857,19 @@ global.get $std/array/arr i32.const 0 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 1 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop i32.const 0 local.set $0 global.get $std/array/arr @@ -14393,7 +14884,7 @@ local.tee $1 i32.load offset=4 local.set $4 - loop $for-loop|040 + loop $for-loop|039 local.get $0 local.get $3 local.get $2 @@ -14413,18 +14904,20 @@ i32.load offset=4 i32.add i32.load - f32.convert_i32_s - local.set $20 + local.set $6 + i32.const 3 + global.set $~argumentsLength local.get $4 local.get $5 i32.add - local.get $20 + local.get $6 + f32.convert_i32_s f32.store local.get $0 i32.const 1 i32.add local.set $0 - br $for-loop|040 + br $for-loop|039 end end local.get $1 @@ -14545,9 +15038,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr @@ -14655,9 +15150,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr @@ -14807,9 +15304,11 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 37 i32.const 0 @@ -14955,146 +15454,91 @@ global.get $std/array/arr i32.const 0 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 1 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 2 call $~lib/array/Array#push + drop global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + drop 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 $0 + i32.const 0 + global.set $~argumentsLength block $__inlined_func$~lib/array/Array#sort (result i32) - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 5280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 + local.get $0 i32.load offset=12 - local.tee $5 + local.tee $2 i32.const 1 i32.le_s if - local.get $4 + local.get $0 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $4 + local.get $0 i32.load offset=4 - local.set $3 - local.get $5 + local.set $1 + local.get $2 i32.const 2 i32.eq if - local.get $3 + local.get $1 f32.load offset=4 - local.tee $20 - local.get $3 + local.set $26 + local.get $1 f32.load - local.tee $34 + local.set $34 + i32.const 2 + global.set $~argumentsLength + local.get $26 + local.get $34 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $3 + local.get $1 local.get $34 f32.store offset=4 - local.get $3 - local.get $20 + local.get $1 + local.get $26 f32.store end - local.get $4 + local.get $0 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $5 + local.get $2 i32.const 256 i32.lt_s if - i32.const 0 - local.set $2 - loop $for-loop|02 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $20 - local.get $2 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|1 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $20 - local.get $3 - 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 $1 - i32.const 1 - i32.sub - local.set $0 - local.get $3 - local.get $1 - 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 $3 - local.get $0 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $20 - f32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|02 - end - end + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort else - local.get $3 - local.get $5 + local.get $1 + local.get $2 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $0 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 8 i32.const 2 i32.const 9 @@ -15112,141 +15556,82 @@ 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 $1 + i32.const 0 + global.set $~argumentsLength 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 $5 + local.get $1 i32.load offset=12 - local.tee $6 + local.tee $3 i32.const 1 i32.le_s if - local.get $5 + local.get $1 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $5 + local.get $1 i32.load offset=4 - local.set $3 - local.get $6 + local.set $2 + local.get $3 i32.const 2 i32.eq if - local.get $3 + local.get $2 f64.load offset=8 - local.tee $24 - local.get $3 + local.set $27 + local.get $2 f64.load - local.tee $35 + local.set $35 + i32.const 2 + global.set $~argumentsLength + local.get $27 + local.get $35 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $3 + local.get $2 local.get $35 f64.store offset=8 - local.get $3 - local.get $24 + local.get $2 + local.get $27 f64.store end - local.get $5 + local.get $1 call $~lib/rt/pure/__retain br $__inlined_func$~lib/array/Array#sort end - local.get $6 + local.get $3 i32.const 256 i32.lt_s if - i32.const 0 - local.set $2 - loop $for-loop|03 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $24 - local.get $2 - i32.const 1 - i32.sub - local.set $0 - loop $while-continue|14 - local.get $0 - i32.const 0 - i32.ge_s - if - local.get $24 - local.get $3 - 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 $1 - i32.const 1 - i32.sub - local.set $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $35 - f64.store - br $while-continue|14 - end - end - end - local.get $3 - local.get $0 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $24 - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|03 - end - end + local.get $2 + local.get $3 + call $~lib/util/sort/insertionSort else + local.get $2 local.get $3 - local.get $6 call $~lib/util/sort/weakHeapSort end - local.get $5 + local.get $1 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - local.get $5 + local.get $1 i32.const 8 i32.const 3 i32.const 10 i32.const 5456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 call $std/array/isArraysEqual i32.eqz if @@ -15263,18 +15648,21 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.set $3 + i32.const 0 + global.set $~argumentsLength + local.get $3 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $14 + local.get $3 i32.const 5 i32.const 2 i32.const 3 i32.const 5584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15292,11 +15680,14 @@ i32.const 5632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 - i32.const 47 - call $~lib/array/Array#sort + local.set $4 + i32.const 0 + global.set $~argumentsLength + local.get $4 + i32.const 0 + call $~lib/array/Array#sort@varargs call $~lib/rt/pure/__release - local.get $15 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -15328,55 +15719,55 @@ i32.const 5744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + 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 $2 + local.set $6 i32.const 4 i32.const 2 i32.const 3 i32.const 5808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $8 i32.const 4 i32.const 2 i32.const 3 i32.const 5840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $2 i32.const 64 call $std/array/createReverseOrderedArray - local.set $6 + local.set $7 i32.const 128 call $std/array/createReverseOrderedArray - local.set $8 + local.set $10 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $7 + local.set $12 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $10 + local.set $13 i32.const 512 call $std/array/createRandomOrderedArray local.set $17 local.get $16 call $std/array/assertSortedDefault - local.get $1 + local.get $5 call $std/array/assertSortedDefault - local.get $1 + local.get $5 i32.const 1 i32.const 2 i32.const 3 i32.const 5872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15388,16 +15779,16 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $std/array/assertSortedDefault - local.get $2 + local.get $6 i32.const 2 i32.const 2 i32.const 3 i32.const 5904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15409,10 +15800,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $8 call $std/array/assertSortedDefault - local.get $3 - local.get $0 + local.get $8 + local.get $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -15424,10 +15815,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 call $std/array/assertSortedDefault - local.get $6 - local.get $0 + local.get $7 + local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15439,10 +15830,10 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $10 call $std/array/assertSortedDefault - local.get $8 - local.get $0 + local.get $10 + local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15454,10 +15845,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $12 call $std/array/assertSortedDefault - local.get $7 - local.get $0 + local.get $12 + local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15469,10 +15860,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $13 call $std/array/assertSortedDefault - local.get $10 - local.get $0 + local.get $13 + local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -15486,45 +15877,45 @@ end local.get $17 call $std/array/assertSortedDefault - local.get $4 + local.get $0 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $12 + local.get $1 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $21 + local.get $3 call $~lib/rt/pure/__release - local.get $15 + local.get $20 + call $~lib/rt/pure/__release + local.get $4 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $17 + local.get $12 call $~lib/rt/pure/__release - local.get $22 + local.get $13 call $~lib/rt/pure/__release - local.get $23 + local.get $17 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $22 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray @@ -15574,6 +15965,8 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $8 + i32.const 1 + global.set $~argumentsLength block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 local.set $2 @@ -15597,11 +15990,15 @@ i32.const 1 i32.sub call $~lib/array/Array#__get - local.tee $1 + local.set $1 local.get $0 local.get $2 call $~lib/array/Array#__get - local.tee $3 + local.set $3 + i32.const 2 + global.set $~argumentsLength + local.get $1 + local.get $3 call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 i32.const 0 i32.gt_s @@ -15657,56 +16054,11 @@ end i32.const 0 local.set $0 - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 0 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 - i32.const 1600 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 i32.const 0 - i32.const 1600 - call $~lib/memory/memory.fill - local.get $2 - local.set $3 - local.get $2 - local.get $1 - i32.load - local.tee $4 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $1 - local.get $3 - i32.store - local.get $1 - local.get $2 - i32.store offset=4 - local.get $1 - i32.const 1600 - i32.store offset=8 - local.get $1 i32.const 400 - i32.store offset=12 - loop $for-loop|09 + call $~lib/array/Array<~lib/string/String>#constructor + local.set $1 + loop $for-loop|06 local.get $0 i32.const 400 i32.lt_s @@ -15793,9 +16145,11 @@ i32.const 1 i32.add local.set $0 - br $for-loop|09 + br $for-loop|06 end end + i32.const 1 + global.set $~argumentsLength local.get $1 i32.const 56 call $std/array/assertSorted<~lib/array/Array> @@ -15879,10 +16233,10 @@ i32.const 6832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $12 i32.const 6864 call $~lib/array/Array#join - local.tee $15 + local.tee $13 i32.const 6896 call $~lib/string/String.__eq i32.eqz @@ -15982,17 +16336,17 @@ call $~lib/rt/pure/__retain local.tee $5 i32.load offset=4 - local.tee $12 + local.tee $14 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $12 + local.get $14 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 local.get $5 call $~lib/array/Array#join - local.tee $12 + local.tee $14 i32.const 8400 call $~lib/string/String.__eq i32.eqz @@ -16016,9 +16370,9 @@ call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $12 call $~lib/rt/pure/__release - local.get $15 + local.get $13 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -16034,7 +16388,7 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -16084,7 +16438,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $23 + local.set $22 local.get $0 i32.const 8208 call $~lib/string/String.__eq @@ -16101,7 +16455,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $26 + local.set $24 local.get $0 i32.const 8592 call $~lib/string/String.__eq @@ -16118,7 +16472,7 @@ i32.const 6304 call $~lib/array/Array#join local.tee $0 - local.set $27 + local.set $25 local.get $0 i32.const 8624 call $~lib/string/String.__eq @@ -16168,10 +16522,10 @@ local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $14 + local.set $12 i32.const 6304 call $~lib/rt/pure/__release - local.get $14 + local.get $12 i32.const 8752 call $~lib/string/String.__eq i32.eqz @@ -16189,9 +16543,9 @@ i32.const 8800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $13 i32.load offset=4 - local.get $15 + local.get $13 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.set $16 @@ -16310,10 +16664,10 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $12 + local.set $14 i32.const 6304 call $~lib/rt/pure/__release - local.get $12 + local.get $14 i32.const 9360 call $~lib/string/String.__eq i32.eqz @@ -16354,10 +16708,10 @@ local.get $1 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $21 + local.set $20 i32.const 6304 call $~lib/rt/pure/__release - local.get $21 + local.get $20 i32.const 9360 call $~lib/string/String.__eq i32.eqz @@ -16423,11 +16777,11 @@ local.get $6 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $23 + local.get $22 call $~lib/rt/pure/__release - local.get $26 + local.get $24 call $~lib/rt/pure/__release - local.get $27 + local.get $25 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -16435,9 +16789,9 @@ call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $12 call $~lib/rt/pure/__release - local.get $15 + local.get $13 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release @@ -16453,9 +16807,9 @@ call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $21 + local.get $20 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release @@ -16681,9 +17035,9 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $25 + local.get $23 call $~lib/rt/pure/__release - local.get $13 + local.get $15 call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release @@ -16704,124 +17058,2638 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~start - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:std/array - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) + (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 + i32.eqz + if + i32.const 16 + i32.const 7 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end local.get $0 - call $~lib/rt/rtrace/ondecrement + i32.const 0 + i32.store local.get $0 - i32.load - i32.const 1 - i32.and + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 268435452 + i32.gt_u if - i32.const 0 - i32.const 1248 - i32.const 122 - i32.const 14 + i32.const 1040 + i32.const 1088 + i32.const 57 + i32.const 60 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 1 - i32.eq + i32.const 2 + i32.shl + local.tee $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $3 + i32.const 0 + local.get $5 + call $~lib/memory/memory.fill + local.get $3 + local.set $2 + local.get $3 + local.get $0 + i32.load + local.tee $4 + i32.ne if - block $__inlined_func$~lib/rt/__visit_members - block $folding-inner1 - block $folding-inner0 - block $switch$1$default - block $switch$1$case$4 - local.get $0 - i32.const 8 - i32.add - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $switch$1$default - end - local.get $0 - i32.load offset=16 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__visit - br $__inlined_func$~lib/rt/__visit_members - end - 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 $3 - loop $while-continue|0 - local.get $1 - local.get $3 - i32.lt_u - if - local.get $1 - i32.load - local.tee $4 - if - local.get $4 - call $~lib/rt/pure/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - i32.load offset=16 - call $~lib/rt/pure/__visit - end local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 1248 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/freeBlock - else - local.get $1 - i32.const 0 - i32.le_u - if - i32.const 0 + 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 $3 + i32.store offset=4 + local.get $0 + local.get $5 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.const 0 + local.get $1 + select + local.tee $4 + i32.add + local.tee $2 + i32.const 268435452 + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 + local.tee $5 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $5 + i32.add + local.get $1 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/array/Array#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $5 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $4 + local.get $3 + call $~lib/array/Array#push + drop + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + ) + (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $2 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.tee $1 + i32.sub + local.tee $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.tee $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.ne + if + local.get $6 + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 + ) + (func $~lib/array/Array#flat (param $0 i32) (result i32) + i32.const 10048 + i32.const 1088 + i32.const 504 + i32.const 7 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1073741808 + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $3 + local.set $2 + local.get $3 + local.get $0 + i32.load + local.tee $4 + 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 $3 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $0 + i32.load offset=12 + local.tee $3 + i32.const 1 + i32.add + local.tee $2 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.get $3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.const 0 + local.get $1 + select + local.tee $4 + i32.add + local.tee $2 + i32.const 1073741808 + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 + local.tee $5 + local.get $0 + i32.load offset=4 + local.get $3 + call $~lib/memory/memory.copy + local.get $3 + local.get $5 + i32.add + local.get $1 + i32.load offset=4 + local.get $4 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (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.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.set $3 + local.get $0 + i32.load offset=4 + local.tee $5 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $4 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $4 + local.get $1 + local.get $4 + i32.lt_s + select + end + local.tee $1 + i32.add + local.get $5 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + end + local.tee $2 + i32.add + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $4 + i32.add + local.tee $3 + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select + end + local.get $2 + i32.sub + local.tee $2 + local.get $4 + local.get $1 + i32.sub + local.tee $1 + local.get $2 + local.get $1 + i32.lt_s + select + call $~lib/memory/memory.copy + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#pop (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 300 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/array/Array#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $5 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_u + local.set $3 + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $4 + local.get $3 + call $~lib/array/Array#push + drop + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + ) + (func $~lib/array/Array#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load8_u + local.get $2 + local.get $2 + i32.const 1 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + call $~lib/memory/memory.copy + local.get $1 + local.get $2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + i32.const 1 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $2 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.tee $3 + i32.const 1 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.sub + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $2 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.tee $1 + i32.sub + local.tee $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.tee $5 + local.get $1 + i32.add + local.tee $6 + local.get $2 + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.ne + if + local.get $6 + local.get $1 + local.get $5 + i32.add + local.get $3 + local.get $1 + i32.sub + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 + ) + (func $~lib/array/Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.add + local.set $1 + loop $while-continue|0 + local.get $2 + local.get $1 + i32.lt_u + if + local.get $2 + i32.load8_u + local.set $3 + local.get $2 + local.get $1 + i32.load8_u + i32.store8 + local.get $1 + local.get $3 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $5 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|0 + local.get $4 + i32.const 0 + i32.gt_s + if + local.get $4 + local.set $3 + loop $while-continue|1 + local.get $3 + i32.const 1 + i32.and + local.get $5 + local.get $3 + i32.const 6 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + i32.const 1 + i32.shr_s + i32.const 31 + i32.and + i32.shr_u + i32.const 1 + i32.and + i32.eq + if + local.get $3 + i32.const 1 + i32.shr_s + local.set $3 + br $while-continue|1 + end + end + local.get $0 + local.get $3 + i32.const 1 + i32.shr_s + local.tee $7 + i32.add + i32.load8_u + local.set $3 + local.get $0 + local.get $4 + i32.add + i32.load8_u + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $5 + local.get $4 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.tee $8 + local.get $8 + i32.load + i32.const 1 + local.get $4 + i32.const 31 + i32.and + i32.shl + i32.xor + i32.store + local.get $0 + local.get $4 + i32.add + local.get $3 + i32.store8 + local.get $0 + local.get $7 + i32.add + local.get $6 + i32.store8 + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|0 + end + end + local.get $1 + i32.const 1 + i32.sub + local.set $4 + loop $for-loop|2 + local.get $4 + i32.const 2 + i32.ge_s + if + local.get $0 + i32.load8_u + local.set $1 + local.get $0 + local.get $0 + local.get $4 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + local.get $1 + i32.store8 + i32.const 1 + local.set $1 + loop $while-continue|3 + local.get $5 + local.get $1 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + i32.const 31 + i32.and + i32.shr_u + i32.const 1 + i32.and + local.get $1 + i32.const 1 + i32.shl + i32.add + local.tee $3 + local.get $4 + i32.lt_s + if + local.get $3 + local.set $1 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $1 + i32.const 0 + i32.gt_s + if + local.get $0 + i32.load8_u + local.set $3 + local.get $0 + local.get $1 + i32.add + i32.load8_u + local.set $6 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $6 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.tee $7 + local.get $7 + i32.load + i32.const 1 + local.get $1 + i32.const 31 + i32.and + i32.shl + i32.xor + i32.store + local.get $0 + local.get $1 + i32.add + local.get $3 + i32.store8 + local.get $0 + local.get $6 + i32.store8 + end + local.get $1 + i32.const 1 + i32.shr_s + local.set $1 + br $while-continue|4 + end + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|2 + end + end + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + local.get $0 + i32.load8_u offset=1 + local.set $1 + local.get $0 + local.get $0 + i32.load8_u + i32.store8 offset=1 + local.get $0 + local.get $1 + i32.store8 + ) + (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $0 + i32.load offset=4 + local.set $5 + local.get $2 + i32.const 2 + i32.eq + if + local.get $5 + i32.load8_u offset=1 + local.set $2 + local.get $5 + i32.load8_u + local.set $3 + i32.const 2 + global.set $~argumentsLength + local.get $2 + local.get $3 + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $5 + local.get $3 + i32.store8 offset=1 + local.get $5 + local.get $2 + i32.store8 + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $2 + local.set $3 + local.get $1 + local.set $4 + loop $for-loop|0 + local.get $6 + local.get $3 + i32.lt_s + if + local.get $5 + local.get $6 + i32.add + i32.load8_u + local.set $7 + local.get $6 + i32.const 1 + i32.sub + local.set $1 + loop $while-continue|1 + local.get $1 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $1 + local.get $5 + i32.add + i32.load8_u + local.set $8 + i32.const 2 + global.set $~argumentsLength + local.get $7 + local.get $8 + local.get $4 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $1 + local.tee $2 + i32.const 1 + i32.sub + local.set $1 + local.get $5 + local.get $2 + i32.const 1 + i32.add + i32.add + local.get $8 + i32.store8 + br $while-continue|1 + end + end + end + local.get $5 + local.get $1 + i32.const 1 + i32.add + i32.add + local.get $7 + i32.store8 + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + else + local.get $5 + local.get $2 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $4 + local.get $0 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $1 + local.get $2 + local.get $1 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $1 + local.get $3 + local.get $1 + i32.lt_s + select + end + local.set $1 + loop $for-loop|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $3 + i32.ne + if + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + call $~lib/rt/pure/__release + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $0 + call $~lib/rt/pure/__retain + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/array/Array<~lib/string/String>#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + local.get $1 + call $~lib/rt/pure/__release + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + call $~lib/string/String.__eq + if + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const -1 + ) + (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $0 + i32.load offset=12 + local.tee $3 + i32.const 1 + i32.add + local.tee $2 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $2 + i32.store offset=12 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/array/Array<~lib/string/String>#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $1 + i32.load offset=12 + i32.const 0 + local.get $1 + select + local.tee $6 + i32.add + local.tee $2 + i32.const 268435452 + i32.gt_u + if + i32.const 1040 + i32.const 1088 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + i32.load offset=4 + local.set $2 + local.get $4 + i32.const 2 + i32.shl + local.set $4 + local.get $0 + i32.load offset=4 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $4 + i32.lt_u + if + local.get $2 + local.get $3 + i32.add + local.get $0 + local.get $3 + i32.add + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + local.get $4 + i32.add + local.set $0 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.set $2 + loop $for-loop|1 + local.get $5 + local.get $2 + i32.lt_u + if + local.get $0 + local.get $5 + i32.add + local.get $3 + local.get $5 + i32.add + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $5 + i32.const 4 + i32.add + local.set $5 + br $for-loop|1 + end + end + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + ) + (func $~lib/array/Array<~lib/string/String>#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 $0 + i32.load offset=4 + local.set $5 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $4 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $4 + local.get $1 + local.get $4 + i32.lt_s + select + end + local.tee $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + end + local.tee $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $4 + i32.add + local.tee $3 + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select + end + local.get $2 + i32.sub + local.tee $3 + local.get $4 + local.get $1 + i32.sub + local.tee $4 + local.get $3 + local.get $4 + i32.lt_s + select + local.tee $3 + i32.add + i32.lt_s + i32.const 0 + local.get $2 + local.get $1 + i32.lt_s + select + if + local.get $2 + local.get $3 + i32.const 1 + i32.sub + local.tee $4 + i32.add + local.set $2 + local.get $1 + local.get $4 + i32.add + local.set $1 + loop $while-continue|0 + local.get $3 + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $6 + i32.ne + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $6 + call $~lib/rt/pure/__retain + i32.store + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 + end + end + else + loop $while-continue|1 + local.get $3 + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $6 + i32.ne + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $6 + call $~lib/rt/pure/__retain + i32.store + local.get $4 + call $~lib/rt/pure/__release + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|1 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#pop (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 300 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + loop $for-loop|0 + local.get $3 + local.get $5 + local.get $0 + i32.load offset=12 + local.tee $2 + local.get $5 + local.get $2 + i32.lt_s + select + i32.lt_s + if + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $3 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $4 + local.get $2 + call $~lib/array/Array<~lib/string/String>#push + drop + end + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 1984 + i32.const 1088 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + call $~lib/rt/pure/__retain + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $4 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#unshift (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $1 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.tee $3 + i32.const 4 + i32.add + local.get $3 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $2 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + ) + (func $~lib/array/Array<~lib/string/String>#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 2 + i32.shl + local.set $1 + loop $while-continue|0 + local.get $4 + local.get $1 + i32.lt_u + if + local.get $4 + local.get $5 + i32.add + local.get $0 + local.get $4 + i32.add + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + i32.const 4 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $3 + ) + (func $~lib/array/Array<~lib/string/String>#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $2 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.tee $1 + i32.sub + local.tee $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.tee $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.ne + if + local.get $6 + local.get $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $while-continue|0 + local.get $2 + local.get $1 + i32.lt_u + if + local.get $2 + i32.load + call $~lib/rt/pure/__retain + local.set $3 + local.get $2 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $3 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~start + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end + call $start:std/array + ) + (func $~lib/rt/pure/decrement (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 268435455 + i32.and + local.set $1 + local.get $0 + call $~lib/rt/rtrace/ondecrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 1248 + i32.const 122 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.eq + if + block $__inlined_func$~lib/rt/__visit_members + block $folding-inner1 + block $folding-inner0 + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 8 + i32.add + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner0 $folding-inner0 $folding-inner1 $switch$1$default + end + local.get $0 + i32.load offset=16 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end + local.get $0 + i32.load offset=16 + call $~lib/rt/pure/__visit + br $__inlined_func$~lib/rt/__visit_members + end + 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 $3 + loop $while-continue|0 + local.get $1 + local.get $3 + i32.lt_u + if + local.get $1 + i32.load + local.tee $4 + if + local.get $4 + call $~lib/rt/pure/__visit + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + i32.load offset=16 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const -2147483648 + i32.and + if + i32.const 0 + i32.const 1248 + i32.const 126 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/freeBlock + else + local.get $1 + i32.const 0 + i32.le_u + if + i32.const 0 i32.const 1248 i32.const 136 i32.const 16 @@ -16829,26 +19697,759 @@ unreachable end local.get $0 - local.get $1 + local.get $1 + i32.const 1 + i32.sub + local.get $2 + i32.const -268435456 + i32.and + i32.or + i32.store offset=4 + end + ) + (func $~lib/rt/pure/__visit (param $0 i32) + local.get $0 + i32.const 10088 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) + (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + ) + (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#fill + ) + (func $~lib/array/Array#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#includes + ) + (func $~lib/array/Array#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + ) + (func $~lib/array/Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + end + block $__inlined_func$~lib/array/Array#lastIndexOf + local.get $0 + local.tee $3 + i32.load offset=12 + local.tee $0 + i32.eqz + if + i32.const -1 + local.set $0 + br $__inlined_func$~lib/array/Array#lastIndexOf + end + local.get $0 + local.get $2 + i32.add + local.get $0 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $0 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + i32.load offset=4 + local.set $2 + loop $while-continue|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + br_if $__inlined_func$~lib/array/Array#lastIndexOf + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end + i32.const -1 + local.set $0 + end + local.get $0 + ) + (func $~lib/array/Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#copyWithin + ) + (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#slice + ) + (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#splice + ) + (func $~lib/array/Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 6304 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#join + ) + (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + ) + (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#fill + ) + (func $~lib/array/Array#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + ) + (func $~lib/array/Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + end + block $__inlined_func$~lib/array/Array#lastIndexOf + local.get $0 + local.tee $3 + i32.load offset=12 + local.tee $0 + i32.eqz + if + i32.const -1 + local.set $0 + br $__inlined_func$~lib/array/Array#lastIndexOf + end + local.get $0 + local.get $2 + i32.add + local.get $0 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $0 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + i32.load offset=4 + local.set $2 + loop $while-continue|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $__inlined_func$~lib/array/Array#lastIndexOf + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end + i32.const -1 + local.set $0 + end + local.get $0 + ) + (func $~lib/array/Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#copyWithin + ) + (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#slice + ) + (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#splice + ) + (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 57 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#sort + ) + (func $~lib/array/Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 6304 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#join + ) + (func $~lib/array/Array<~lib/string/String>#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#constructor + ) + (func $~lib/array/Array<~lib/string/String>#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + i32.const 2147483647 + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array<~lib/string/String>#fill + ) + (func $~lib/array/Array<~lib/string/String>#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $0 + local.get $2 + call $~lib/array/Array<~lib/string/String>#indexOf + i32.const 0 + i32.ge_s + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/array/Array<~lib/string/String>#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#indexOf + ) + (func $~lib/array/Array<~lib/string/String>#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + end + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + block $__inlined_func$~lib/array/Array<~lib/string/String>#lastIndexOf + local.get $0 + local.tee $3 + i32.load offset=12 + local.tee $0 + i32.eqz + if + local.get $1 + call $~lib/rt/pure/__release + i32.const -1 + local.set $0 + br $__inlined_func$~lib/array/Array<~lib/string/String>#lastIndexOf + end + local.get $0 + local.get $2 + i32.add + local.get $0 i32.const 1 i32.sub local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 + local.get $2 + local.get $0 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $0 + local.get $3 + i32.load offset=4 + local.set $2 + loop $while-continue|0 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + call $~lib/string/String.__eq + if + local.get $1 + call $~lib/rt/pure/__release + br $__inlined_func$~lib/array/Array<~lib/string/String>#lastIndexOf + end + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const -1 + local.set $0 end + local.get $0 ) - (func $~lib/rt/pure/__visit (param $0 i32) + (func $~lib/array/Array<~lib/string/String>#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2147483647 + local.set $3 + end local.get $0 - i32.const 10032 - i32.lt_u - if - return + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array<~lib/string/String>#copyWithin + ) + (func $~lib/array/Array<~lib/string/String>#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const 2147483647 + local.set $2 end local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#slice + ) + (func $~lib/array/Array<~lib/string/String>#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 2147483647 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#splice + ) + (func $~lib/array/Array<~lib/string/String>#sort@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 58 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#sort + ) + (func $~lib/array/Array<~lib/string/String>#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 6304 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String | null>#join + ) + (func $~setArgumentsLength (param $0 i32) + local.get $0 + global.set $~argumentsLength ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index a37b971c25..b788a6882a 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1060,3 +1060,11 @@ __release(changetype(arr)); let testArray: i32[][] = [[], []]; assert(testArray.flat().length == 0); } + +// export extended arrays + +export class ArrayU32 extends Array {} +export class ArrayU8 extends Array {} +export class ArrayStr extends Array {} +// TODO: +// export class ArrayArrayI32 extends Array> {} \ No newline at end of file diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 68fe3d86d1..5a771d6d80 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -235,6 +235,7 @@ (data (i32.const 10384) " \00\00\00\01\00\00\00\00\00\00\00 \00\00\00@\'\00\00\80\'\00\00\00\00\00\00\a0\'\00\00\e0\'\00\00\00(\00\00 (\00\00`(\00\00") (data (i32.const 10432) "\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 10448) "\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 10464) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00I\00l\00l\00e\00g\00a\00l\00 \00g\00e\00n\00e\00r\00i\00c\00 \00t\00y\00p\00e\00") (table $0 57 funcref) (elem (i32.const 1) $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) @@ -262,9 +263,91 @@ (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) (global $~started (mut i32) (i32.const 0)) - (global $~lib/heap/__heap_base i32 (i32.const 10464)) + (global $~lib/heap/__heap_base i32 (i32.const 10520)) + (global $std/array/ArrayU32 i32 (i32.const 26)) + (global $std/array/ArrayU8 i32 (i32.const 27)) + (global $std/array/ArrayStr i32 (i32.const 28)) (export "_start" (func $~start)) (export "memory" (memory $0)) + (export "ArrayU32" (global $std/array/ArrayU32)) + (export "ArrayU32#constructor" (func $~lib/array/Array#constructor@varargs)) + (export "ArrayU32#get:length" (func $~lib/array/Array#get:length)) + (export "ArrayU32#set:length" (func $~lib/array/Array#set:length)) + (export "ArrayU32#every" (func $~lib/array/Array#every)) + (export "ArrayU32#findIndex" (func $~lib/array/Array#findIndex)) + (export "ArrayU32#fill" (func $~lib/array/Array#fill@varargs)) + (export "ArrayU32#includes" (func $~lib/array/Array#includes@varargs)) + (export "ArrayU32#indexOf" (func $~lib/array/Array#indexOf@varargs)) + (export "ArrayU32#lastIndexOf" (func $~lib/array/Array#lastIndexOf@varargs)) + (export "ArrayU32#push" (func $~lib/array/Array#push)) + (export "ArrayU32#concat" (func $~lib/array/Array#concat)) + (export "ArrayU32#copyWithin" (func $~lib/array/Array#copyWithin@varargs)) + (export "ArrayU32#pop" (func $~lib/array/Array#pop)) + (export "ArrayU32#forEach" (func $~lib/array/Array#forEach)) + (export "ArrayU32#filter" (func $~lib/array/Array#filter)) + (export "ArrayU32#shift" (func $~lib/array/Array#shift)) + (export "ArrayU32#some" (func $~lib/array/Array#some)) + (export "ArrayU32#unshift" (func $~lib/array/Array#unshift)) + (export "ArrayU32#slice" (func $~lib/array/Array#slice@varargs)) + (export "ArrayU32#splice" (func $~lib/array/Array#splice@varargs)) + (export "ArrayU32#reverse" (func $~lib/array/Array#reverse)) + (export "ArrayU32#sort" (func $~lib/array/Array#sort@varargs)) + (export "ArrayU32#join" (func $~lib/array/Array#join@varargs)) + (export "ArrayU32#flat" (func $~lib/array/Array#flat)) + (export "ArrayU32#toString" (func $~lib/array/Array#toString)) + (export "ArrayU8" (global $std/array/ArrayU8)) + (export "ArrayU8#constructor" (func $~lib/array/Array#constructor@varargs)) + (export "ArrayU8#get:length" (func $~lib/array/Array#get:length)) + (export "ArrayU8#set:length" (func $~lib/array/Array#set:length)) + (export "ArrayU8#every" (func $~lib/array/Array#every)) + (export "ArrayU8#findIndex" (func $~lib/array/Array#findIndex)) + (export "ArrayU8#fill" (func $~lib/array/Array#fill@varargs)) + (export "ArrayU8#includes" (func $~lib/array/Array#includes@varargs)) + (export "ArrayU8#indexOf" (func $~lib/array/Array#indexOf@varargs)) + (export "ArrayU8#lastIndexOf" (func $~lib/array/Array#lastIndexOf@varargs)) + (export "ArrayU8#push" (func $~lib/array/Array#push)) + (export "ArrayU8#concat" (func $~lib/array/Array#concat)) + (export "ArrayU8#copyWithin" (func $~lib/array/Array#copyWithin@varargs)) + (export "ArrayU8#pop" (func $~lib/array/Array#pop)) + (export "ArrayU8#forEach" (func $~lib/array/Array#forEach)) + (export "ArrayU8#filter" (func $~lib/array/Array#filter)) + (export "ArrayU8#shift" (func $~lib/array/Array#shift)) + (export "ArrayU8#some" (func $~lib/array/Array#some)) + (export "ArrayU8#unshift" (func $~lib/array/Array#unshift)) + (export "ArrayU8#slice" (func $~lib/array/Array#slice@varargs)) + (export "ArrayU8#splice" (func $~lib/array/Array#splice@varargs)) + (export "ArrayU8#reverse" (func $~lib/array/Array#reverse)) + (export "ArrayU8#sort" (func $~lib/array/Array#sort@varargs)) + (export "ArrayU8#join" (func $~lib/array/Array#join@varargs)) + (export "ArrayU8#flat" (func $~lib/array/Array#flat)) + (export "ArrayU8#toString" (func $~lib/array/Array#toString)) + (export "ArrayStr" (global $std/array/ArrayStr)) + (export "ArrayStr#constructor" (func $~lib/array/Array<~lib/string/String>#constructor@varargs)) + (export "ArrayStr#get:length" (func $~lib/array/Array<~lib/string/String>#get:length)) + (export "ArrayStr#set:length" (func $~lib/array/Array<~lib/string/String>#set:length)) + (export "ArrayStr#every" (func $~lib/array/Array<~lib/string/String>#every)) + (export "ArrayStr#findIndex" (func $~lib/array/Array<~lib/string/String>#findIndex)) + (export "ArrayStr#fill" (func $~lib/array/Array<~lib/string/String>#fill@varargs)) + (export "ArrayStr#includes" (func $~lib/array/Array<~lib/string/String>#includes@varargs)) + (export "ArrayStr#indexOf" (func $~lib/array/Array<~lib/string/String>#indexOf@varargs)) + (export "ArrayStr#lastIndexOf" (func $~lib/array/Array<~lib/string/String>#lastIndexOf@varargs)) + (export "ArrayStr#push" (func $~lib/array/Array<~lib/string/String>#push)) + (export "ArrayStr#concat" (func $~lib/array/Array<~lib/string/String>#concat)) + (export "ArrayStr#copyWithin" (func $~lib/array/Array<~lib/string/String>#copyWithin@varargs)) + (export "ArrayStr#pop" (func $~lib/array/Array<~lib/string/String>#pop)) + (export "ArrayStr#forEach" (func $~lib/array/Array<~lib/string/String>#forEach)) + (export "ArrayStr#filter" (func $~lib/array/Array<~lib/string/String>#filter)) + (export "ArrayStr#shift" (func $~lib/array/Array<~lib/string/String>#shift)) + (export "ArrayStr#some" (func $~lib/array/Array<~lib/string/String>#some)) + (export "ArrayStr#unshift" (func $~lib/array/Array<~lib/string/String>#unshift)) + (export "ArrayStr#slice" (func $~lib/array/Array<~lib/string/String>#slice@varargs)) + (export "ArrayStr#splice" (func $~lib/array/Array<~lib/string/String>#splice@varargs)) + (export "ArrayStr#reverse" (func $~lib/array/Array<~lib/string/String>#reverse)) + (export "ArrayStr#sort" (func $~lib/array/Array<~lib/string/String>#sort@varargs)) + (export "ArrayStr#join" (func $~lib/array/Array<~lib/string/String>#join@varargs)) + (export "ArrayStr#flat" (func $~lib/array/Array<~lib/string/String>#flat)) + (export "ArrayStr#toString" (func $~lib/array/Array<~lib/string/String>#toString)) + (export "__setArgumentsLength" (func $~setArgumentsLength)) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 global.get $~lib/heap/__heap_base @@ -4787,6 +4870,8 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy + i32.const 0 + drop local.get $2 local.get $4 i32.const 2 @@ -25516,817 +25601,6026 @@ local.get $63 call $~lib/rt/pure/__release ) - (func $~start - global.get $~started + (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.eqz if - return - else - i32.const 1 - global.set $~started + i32.const 16 + i32.const 7 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 end - call $start:std/array - ) - (func $~lib/rt/pure/finalize (param $0 i32) + local.get $0 i32.const 0 - drop - global.get $~lib/rt/tlsf/ROOT + i32.store local.get $0 - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) + i32.const 0 + i32.store offset=4 local.get $0 - i32.load offset=4 - local.set $1 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $1 - i32.const 268435455 - i32.and + i32.const 1073741808 + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl local.set $2 - i32.const 1 - drop - local.get $0 - call $~lib/rt/rtrace/ondecrement - i32.const 1 - drop + local.get $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill local.get $0 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 i32.load - i32.const 1 - i32.and - i32.eqz - i32.eqz + local.tee $6 + i32.ne if - i32.const 0 - i32.const 240 - i32.const 122 - i32.const 14 - call $~lib/builtins/abort - unreachable + local.get $5 + call $~lib/rt/pure/__retain + local.set $5 + local.get $6 + call $~lib/rt/pure/__release end + local.get $5 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 local.get $2 - i32.const 1 - i32.eq + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $std/array/ArrayU32#constructor (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.eqz if - local.get $0 i32.const 16 - i32.add - i32.const 1 - call $~lib/rt/__visit_members - i32.const 1 - drop - i32.const 1 - drop + i32.const 26 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + local.set $0 + local.get $0 + ) + (func $~lib/array/Array#get:buffer (param $0 i32) (result i32) + local.get $0 + i32.load + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load + local.tee $2 + i32.ne + if local.get $1 - i32.const -2147483648 - i32.and - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 240 - i32.const 126 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/finalize - else - i32.const 1 - drop - local.get $2 - i32.const 0 - i32.gt_u - i32.eqz - if - i32.const 0 - i32.const 240 - i32.const 136 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - i32.const 1 + call $~lib/rt/pure/__retain drop - local.get $0 - local.get $1 - i32.const 268435455 - i32.const -1 - i32.xor - i32.and local.get $2 - i32.const 1 - i32.sub - i32.or - i32.store offset=4 + call $~lib/rt/pure/__release end + local.get $1 + i32.store ) - (func $~lib/rt/pure/__collect - i32.const 1 - drop - return + (func $~lib/array/Array#get:dataStart (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 ) - (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) local.get $0 - global.get $~lib/heap/__heap_base - i32.lt_u - if - return - end - i32.const 1 - drop - i32.const 1 - drop local.get $1 - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 240 - i32.const 69 - i32.const 16 - call $~lib/builtins/abort - unreachable - end + i32.store offset=4 + ) + (func $~lib/array/Array#get:byteLength (param $0 i32) (result i32) local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.load offset=8 ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop + (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + i32.store offset=8 ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop + (func $~lib/array/Array#get:length_ (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + i32.store offset=12 ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 i32.const 0 drop local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + (func $~lib/array/Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - drop - local.get $0 - i32.load offset=4 + i32.const 0 local.set $2 - local.get $2 local.get $0 i32.load offset=12 - i32.const 2 - i32.shl - i32.add local.set $3 - loop $while-continue|0 + loop $for-loop|0 local.get $2 local.get $3 - i32.lt_u - local.set $4 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 local.get $4 if + local.get $0 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add i32.load - local.set $5 - local.get $5 + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit + i32.const 0 + return end local.get $2 - i32.const 4 + i32.const 1 i32.add local.set $2 - br $while-continue|0 + br $for-loop|0 end end - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit + i32.const 1 ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - drop - local.get $0 - i32.load offset=4 + i32.const 0 local.set $2 - local.get $2 local.get $0 i32.load offset=12 - i32.const 2 - i32.shl - i32.add local.set $3 - loop $while-continue|0 + loop $for-loop|0 local.get $2 local.get $3 - i32.lt_u + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s local.set $4 local.get $4 if + local.get $0 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add i32.load - local.set $5 - local.get $5 + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit + local.get $2 + return end local.get $2 - i32.const 4 + i32.const 1 i32.add local.set $2 - br $while-continue|0 + br $for-loop|0 end end - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit + i32.const -1 ) - (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1 + (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 drop local.get $0 i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 - i32.load offset=12 + local.get $1 i32.const 2 i32.shl i32.add - local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 + local.get $2 + i32.store + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s if - local.get $2 - i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 + i32.const 496 + i32.const 80 + i32.const 120 + i32.const 22 + call $~lib/builtins/abort + unreachable end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 end local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + local.get $2 + call $~lib/array/Array#__uset ) - (func $~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - drop - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 + (local $6 i32) local.get $0 i32.load offset=12 - i32.const 2 - i32.shl - i32.add local.set $3 + local.get $3 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $2 + local.get $3 + i32.ge_s + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $6 loop $while-continue|0 local.get $2 local.get $3 - i32.lt_u + i32.lt_s local.set $4 local.get $4 if + local.get $6 local.get $2 + i32.const 2 + i32.shl + i32.add i32.load - local.set $5 - local.get $5 + local.get $1 + i32.eq if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit + local.get $2 + return end local.get $2 - i32.const 4 + i32.const 1 i32.add local.set $2 br $while-continue|0 end end + i32.const -1 + ) + (func $~lib/array/Array#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 0 + drop local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + return ) - (func $~lib/array/Array<~lib/string/String | null>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - drop - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 local.get $0 i32.load offset=12 - i32.const 2 - i32.shl - i32.add local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $2 - i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end + local.get $3 + i32.const 0 + i32.eq + if + i32.const -1 + return end - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1 - drop - local.get $0 - i32.load offset=4 - local.set $2 local.get $2 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $3 - loop $while-continue|0 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.set $2 + else local.get $2 local.get $3 - i32.lt_u - local.set $4 - local.get $4 + i32.ge_s if - local.get $2 - i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $2 - i32.const 4 - i32.add + local.get $3 + i32.const 1 + i32.sub local.set $2 - br $while-continue|0 end end local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) - i32.const 0 - drop - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1 - drop - local.get $0 i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $3 + local.set $4 loop $while-continue|0 local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 + i32.const 0 + i32.ge_s + local.set $5 + local.get $5 if + local.get $4 local.get $2 + i32.const 2 + i32.shl + i32.add i32.load - local.set $5 - local.get $5 + local.get $1 + i32.eq if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit + local.get $2 + return end local.get $2 - i32.const 4 - i32.add + i32.const 1 + i32.sub local.set $2 br $while-continue|0 end end - local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit + i32.const -1 ) - (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1 - drop local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl + i32.const 1 i32.add local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $2 - i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end - end local.get $0 - i32.load - local.get $1 - call $~lib/rt/pure/__visit - ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit_impl (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1 + local.get $3 + i32.const 2 + call $~lib/array/ensureSize + i32.const 0 drop local.get $0 i32.load offset=4 - local.set $2 local.get $2 - local.get $0 - i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_u - local.set $4 - local.get $4 - if - local.get $2 - i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end - end - local.get $0 - i32.load local.get $1 - call $~lib/rt/pure/__visit + i32.store + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#__visit_impl (param $0 i32) (param $1 i32) + (func $~lib/array/Array#concat (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - drop + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 + i32.const 0 + local.get $1 + i32.load offset=12 + local.get $1 + i32.const 0 + i32.eq + select + local.set $3 + local.get $2 + local.get $3 + i32.add + local.set $4 + local.get $4 + i32.const 1073741808 + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $5 + local.get $5 + i32.load offset=4 + local.set $6 + local.get $2 + i32.const 2 + i32.shl + local.set $7 + i32.const 0 + drop + local.get $6 + local.get $0 + i32.load offset=4 + local.get $7 + call $~lib/memory/memory.copy + local.get $6 + local.get $7 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $5 + local.set $8 + local.get $1 + call $~lib/rt/pure/__release + local.get $8 + ) + (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 $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $1 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $1 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $8 local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $9 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $10 + local.get $10 + local.get $9 + i32.sub + local.tee $6 + local.get $5 + local.get $8 + i32.sub + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $11 + i32.const 0 + drop + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + local.get $11 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#pop (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 300 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 i32.const 2 i32.shl i32.add + i32.load + local.set $2 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 local.set $3 - loop $while-continue|0 + loop $for-loop|0 local.get $2 local.get $3 - i32.lt_u + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s local.set $4 local.get $4 if + local.get $0 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add i32.load - local.set $5 - local.get $5 - if - local.get $5 - local.get $1 - call $~lib/rt/pure/__visit - end local.get $2 - i32.const 4 - i32.add - local.set $2 - br $while-continue|0 - end + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/array/Array#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 0 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $3 + local.get $4 + local.tee $5 + local.get $0 + i32.load offset=12 + local.tee $6 + local.get $5 + local.get $6 + i32.lt_s + select + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + local.get $6 + call $~lib/array/Array#push + drop + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable end local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 i32.load + local.set $3 local.get $1 - call $~lib/rt/pure/__visit + i32.const 1 + i32.sub + local.set $4 + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + i32.const 0 + drop + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + (func $~lib/array/Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - block $switch$1$default - block $switch$1$case$27 - block $switch$1$case$26 - block $switch$1$case$25 - block $switch$1$case$24 - block $switch$1$case$23 - block $switch$1$case$22 - block $switch$1$case$21 - block $switch$1$case$20 - block $switch$1$case$19 - block $switch$1$case$18 - block $switch$1$case$17 - block $switch$1$case$16 - block $switch$1$case$14 - block $switch$1$case$13 - block $switch$1$case$12 - block $switch$1$case$11 - block $switch$1$case$10 - block $switch$1$case$9 - block $switch$1$case$8 - block $switch$1$case$5 - block $switch$1$case$4 - block $switch$1$case$2 - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $switch$1$case$2 $switch$1$case$2 $switch$1$case$4 $switch$1$case$5 $switch$1$case$2 $switch$1$case$4 $switch$1$case$8 $switch$1$case$9 $switch$1$case$10 $switch$1$case$11 $switch$1$case$12 $switch$1$case$13 $switch$1$case$14 $switch$1$case$2 $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $switch$1$case$19 $switch$1$case$20 $switch$1$case$21 $switch$1$case$22 $switch$1$case$23 $switch$1$case$24 $switch$1$case$25 $switch$1$case$26 $switch$1$case$27 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - local.get $1 - call $~lib/rt/pure/__visit - end - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array>#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/string/String | null>#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/string/String>#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array#__visit_impl - return - end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__visit_impl - return + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + i32.const 1 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.set $3 + local.get $3 + i32.const 4 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + i32.const 0 + drop + local.get $3 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $2 + local.get $2 + local.get $1 + i32.sub + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $3 + local.get $3 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $8 + i32.const 0 + drop + local.get $7 + local.get $8 + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $6 + ) + (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $1 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + local.tee $4 + local.get $3 + local.get $1 + i32.sub + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $9 + local.get $7 + local.get $9 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $2 + i32.add + local.set $10 + local.get $3 + local.get $10 + i32.ne + if + local.get $9 + local.get $8 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $10 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $6 + ) + (func $~lib/array/Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $2 + local.get $3 + i32.load + i32.store + local.get $3 + local.get $5 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.set $3 + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#flat (param $0 i32) (result i32) + i32.const 0 + i32.eqz + drop + i32.const 10480 + i32.const 80 + i32.const 504 + i32.const 7 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1073741808 + i32.const 0 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.shl + local.set $2 + local.get $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + local.get $3 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + local.get $0 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if + local.get $5 + call $~lib/rt/pure/__retain + local.set $5 + local.get $6 + call $~lib/rt/pure/__release + end + local.get $5 + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $std/array/ArrayU8#constructor (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 27 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + local.set $0 + local.get $0 + ) + (func $~lib/array/Array#get:buffer (param $0 i32) (result i32) + local.get $0 + i32.load + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load + local.tee $2 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + drop + local.get $2 + call $~lib/rt/pure/__release + end + local.get $1 + i32.store + ) + (func $~lib/array/Array#get:dataStart (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + ) + (func $~lib/array/Array#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/array/Array#get:byteLength (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/array/Array#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/array/Array#get:length_ (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#set:length_ (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 0 + drop + local.get $0 + local.get $1 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/array/Array#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 0 + drop + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 0 + i32.shl + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 496 + i32.const 80 + i32.const 120 + i32.const 22 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__uset + ) + (func $~lib/array/Array#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $3 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $2 + local.get $3 + i32.ge_s + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + local.set $4 + local.get $4 + if + local.get $6 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 0 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + return + ) + (func $~lib/array/Array#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $3 + i32.const 0 + i32.eq + if + i32.const -1 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.set $2 + else + local.get $2 + local.get $3 + i32.ge_s + if + local.get $3 + i32.const 1 + i32.sub + local.set $2 + end + end + local.get $0 + i32.load offset=4 + local.set $4 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + local.set $5 + local.get $5 + if + local.get $4 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $2 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.const 0 + call $~lib/array/ensureSize + i32.const 0 + drop + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 0 + i32.shl + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 0 + local.get $1 + i32.load offset=12 + local.get $1 + i32.const 0 + i32.eq + select + local.set $3 + local.get $2 + local.get $3 + i32.add + local.set $4 + local.get $4 + i32.const 1073741808 + i32.const 0 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $5 + local.get $5 + i32.load offset=4 + local.set $6 + local.get $2 + i32.const 0 + i32.shl + local.set $7 + i32.const 0 + drop + local.get $6 + local.get $0 + i32.load offset=4 + local.get $7 + call $~lib/memory/memory.copy + local.get $6 + local.get $7 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + local.get $5 + local.set $8 + local.get $1 + call $~lib/rt/pure/__release + local.get $8 + ) + (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 $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $1 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $1 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $8 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $9 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $10 + local.get $10 + local.get $9 + i32.sub + local.tee $6 + local.get $5 + local.get $8 + i32.sub + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $11 + i32.const 0 + drop + local.get $4 + local.get $8 + i32.const 0 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 0 + i32.shl + i32.add + local.get $11 + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#pop (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 300 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $2 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/array/Array#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 0 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $3 + local.get $4 + local.tee $5 + local.get $0 + i32.load offset=12 + local.tee $6 + local.get $5 + local.get $6 + i32.lt_s + select + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $6 + local.get $6 + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + local.get $6 + call $~lib/array/Array#push + drop + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + i32.load8_u + local.set $3 + local.get $1 + i32.const 1 + i32.sub + local.set $4 + local.get $2 + local.get $2 + i32.const 1 + i32.add + local.get $4 + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + i32.const 0 + drop + local.get $2 + local.get $4 + i32.const 0 + i32.shl + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $4 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + i32.const 1 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.set $3 + local.get $3 + i32.const 1 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.sub + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + i32.const 0 + drop + local.get $3 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $2 + local.get $2 + local.get $1 + i32.sub + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $3 + local.get $3 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 0 + i32.shl + i32.add + local.set $8 + i32.const 0 + drop + local.get $7 + local.get $8 + local.get $3 + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + local.get $6 + ) + (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $1 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + local.tee $4 + local.get $3 + local.get $1 + i32.sub + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 + local.get $1 + i32.const 0 + i32.shl + i32.add + local.set $9 + local.get $7 + local.get $9 + local.get $2 + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $2 + i32.add + local.set $10 + local.get $3 + local.get $10 + i32.ne + if + local.get $9 + local.get $8 + local.get $10 + i32.const 0 + i32.shl + i32.add + local.get $3 + local.get $10 + i32.sub + i32.const 0 + i32.shl + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $6 + ) + (func $~lib/array/Array#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 0 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load8_u + local.set $5 + local.get $2 + local.get $3 + i32.load8_u + i32.store8 + local.get $3 + local.get $5 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $3 + i32.const 1 + i32.sub + local.set $3 + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 0 + local.set $3 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + local.get $3 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $5 + local.get $3 + i32.const 1 + i32.sub + local.set $6 + block $while-break|1 + loop $while-continue|1 + local.get $6 + i32.const 0 + i32.ge_s + local.set $7 + local.get $7 + if + local.get $0 + local.get $6 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $8 + local.get $5 + local.get $8 + i32.const 2 + global.set $~argumentsLength + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $6 + local.tee $9 + i32.const 1 + i32.sub + local.set $6 + local.get $9 + i32.const 1 + i32.add + i32.const 0 + i32.shl + i32.add + local.get $8 + i32.store8 + else + br $while-break|1 + end + br $while-continue|1 + end + end + end + local.get $0 + local.get $6 + i32.const 1 + i32.add + i32.const 0 + i32.shl + i32.add + local.get $5 + i32.store8 + local.get $3 + i32.const 1 + i32.add + local.set $3 + 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 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + local.get $1 + i32.const 31 + i32.add + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + local.set $3 + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $4 + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 + i32.const 1 + i32.sub + local.set $5 + loop $for-loop|0 + local.get $5 + i32.const 0 + i32.gt_s + local.set $6 + local.get $6 + if + local.get $5 + local.set $7 + loop $while-continue|1 + local.get $7 + i32.const 1 + i32.and + local.get $4 + local.get $7 + i32.const 6 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 + i32.const 1 + i32.shr_s + i32.const 31 + i32.and + i32.shr_u + i32.const 1 + i32.and + i32.eq + local.set $8 + local.get $8 + if + local.get $7 + i32.const 1 + i32.shr_s + local.set $7 + br $while-continue|1 + end + end + local.get $7 + i32.const 1 + i32.shr_s + local.set $8 + local.get $0 + local.get $8 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $9 + local.get $0 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $10 + local.get $9 + local.get $10 + i32.const 2 + global.set $~argumentsLength + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $5 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $5 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 1 + local.get $5 + i32.const 31 + i32.and + i32.shl + i32.xor + i32.store + local.get $0 + local.get $5 + i32.const 0 + i32.shl + i32.add + local.get $9 + i32.store8 + local.get $0 + local.get $8 + i32.const 0 + i32.shl + i32.add + local.get $10 + i32.store8 + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + br $for-loop|0 + end + end + local.get $1 + i32.const 1 + i32.sub + local.set $5 + loop $for-loop|2 + local.get $5 + i32.const 2 + i32.ge_s + local.set $6 + local.get $6 + if + local.get $0 + i32.load8_u + local.set $10 + local.get $0 + local.get $0 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + i32.store8 + local.get $0 + local.get $5 + i32.const 0 + i32.shl + i32.add + local.get $10 + i32.store8 + i32.const 1 + local.set $9 + loop $while-continue|3 + local.get $9 + i32.const 1 + i32.shl + local.get $4 + local.get $9 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + local.get $9 + i32.const 31 + i32.and + i32.shr_u + i32.const 1 + i32.and + i32.add + local.tee $8 + local.get $5 + i32.lt_s + local.set $7 + local.get $7 + if + local.get $8 + local.set $9 + br $while-continue|3 + end + end + loop $while-continue|4 + local.get $9 + i32.const 0 + i32.gt_s + local.set $7 + local.get $7 + if + local.get $0 + i32.load8_u + local.set $10 + local.get $0 + local.get $9 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $11 + local.get $10 + local.get $11 + i32.const 2 + global.set $~argumentsLength + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $4 + local.get $9 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 5 + i32.shr_u + i32.const 2 + i32.shl + i32.add + i32.load + i32.const 1 + local.get $9 + i32.const 31 + i32.and + i32.shl + i32.xor + i32.store + local.get $0 + local.get $9 + i32.const 0 + i32.shl + i32.add + local.get $10 + i32.store8 + local.get $0 + local.get $11 + i32.store8 + end + local.get $9 + i32.const 1 + i32.shr_s + local.set $9 + br $while-continue|4 + end + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + br $for-loop|2 + end + end + local.get $4 + call $~lib/rt/tlsf/__free + local.get $0 + i32.load8_u offset=1 + local.set $12 + local.get $0 + local.get $0 + i32.load8_u + i32.store8 offset=1 + local.get $0 + local.get $12 + i32.store8 + ) + (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.const 2 + i32.eq + if + local.get $3 + i32.load8_u offset=1 + local.set $4 + local.get $3 + i32.load8_u + local.set $5 + local.get $4 + local.get $5 + i32.const 2 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $5 + i32.store8 offset=1 + local.get $3 + local.get $4 + i32.store8 + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $3 + local.set $6 + local.get $2 + local.set $5 + local.get $1 + local.set $4 + i32.const 0 + drop + local.get $5 + i32.const 256 + i32.lt_s + if + local.get $6 + local.get $5 + local.get $4 + call $~lib/util/sort/insertionSort + else + local.get $6 + local.get $5 + local.get $4 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#flat (param $0 i32) (result i32) + i32.const 0 + i32.eqz + drop + i32.const 10480 + i32.const 80 + i32.const 504 + i32.const 7 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $std/array/ArrayStr#constructor (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 16 + i32.const 28 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#constructor + local.set $0 + local.get $0 + ) + (func $~lib/array/Array<~lib/string/String>#get:buffer (param $0 i32) (result i32) + local.get $0 + i32.load + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#set:buffer (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $1 + local.get $0 + i32.load + local.tee $2 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + drop + local.get $2 + call $~lib/rt/pure/__release + end + local.get $1 + i32.store + ) + (func $~lib/array/Array<~lib/string/String>#get:dataStart (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + ) + (func $~lib/array/Array<~lib/string/String>#set:dataStart (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/array/Array<~lib/string/String>#get:byteLength (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/array/Array<~lib/string/String>#set:byteLength (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=8 + ) + (func $~lib/array/Array<~lib/string/String>#get:length_ (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#set:length_ (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#set:length (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 1 + drop + local.get $2 + local.get $1 + i32.gt_s + if + local.get $0 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.set $5 + loop $do-continue|0 + local.get $4 + i32.load + call $~lib/rt/pure/__release + local.get $4 + i32.const 4 + i32.add + local.tee $4 + local.get $5 + i32.lt_u + local.set $6 + local.get $6 + br_if $do-continue|0 + end + else + local.get $0 + local.get $1 + i32.const 2 + call $~lib/array/ensureSize + end + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#every (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + if + i32.const 0 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/array/Array<~lib/string/String>#findIndex (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array<~lib/string/String>#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $3 + i32.const 1 + drop + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + local.set $6 + local.get $6 + if + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $7 + local.get $1 + local.get $7 + i32.ne + if + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $7 + call $~lib/rt/pure/__release + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $0 + call $~lib/rt/pure/__retain + local.set $6 + local.get $1 + call $~lib/rt/pure/__release + local.get $6 + ) + (func $~lib/array/Array<~lib/string/String>#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $3 + local.get $3 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $2 + local.get $3 + i32.ge_s + end + if + i32.const -1 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + local.set $4 + local.get $4 + if + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + call $~lib/string/String.__eq + if + local.get $2 + local.set $5 + local.get $1 + call $~lib/rt/pure/__release + local.get $5 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 0 + drop + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#indexOf + i32.const 0 + i32.ge_s + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + return + ) + (func $~lib/array/Array<~lib/string/String>#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $3 + local.get $3 + i32.const 0 + i32.eq + if + i32.const -1 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $2 + i32.add + local.set $2 + else + local.get $2 + local.get $3 + i32.ge_s + if + local.get $3 + i32.const 1 + i32.sub + local.set $2 + end + end + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + local.set $4 + local.get $4 + if + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $1 + call $~lib/string/String.__eq + if + local.get $2 + local.set $6 + local.get $1 + call $~lib/rt/pure/__release + local.get $6 + return + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + local.get $2 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.const 2 + call $~lib/array/ensureSize + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#concat (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 0 + local.get $1 + i32.load offset=12 + local.get $1 + i32.const 0 + i32.eq + select + local.set $3 + local.get $2 + local.get $3 + i32.add + local.set $4 + local.get $4 + i32.const 1073741808 + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 229 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $5 + local.get $5 + i32.load offset=4 + local.set $6 + local.get $2 + i32.const 2 + i32.shl + local.set $7 + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $8 + i32.const 0 + local.set $9 + loop $for-loop|0 + local.get $9 + local.get $7 + i32.lt_u + local.set $10 + local.get $10 + if + local.get $8 + local.get $9 + i32.add + i32.load + local.set $11 + local.get $6 + local.get $9 + i32.add + local.get $11 + call $~lib/rt/pure/__retain + i32.store + local.get $9 + i32.const 4 + i32.add + local.set $9 + br $for-loop|0 + end + end + local.get $6 + local.get $7 + i32.add + local.set $6 + local.get $1 + i32.load offset=4 + local.set $9 + local.get $3 + i32.const 2 + i32.shl + local.set $10 + i32.const 0 + local.set $11 + loop $for-loop|1 + local.get $11 + local.get $10 + i32.lt_u + local.set $12 + local.get $12 + if + local.get $9 + local.get $11 + i32.add + i32.load + local.set $13 + local.get $6 + local.get $11 + i32.add + local.get $13 + call $~lib/rt/pure/__retain + i32.store + local.get $11 + i32.const 4 + i32.add + local.set $11 + br $for-loop|1 + end + end + local.get $5 + local.set $10 + local.get $1 + call $~lib/rt/pure/__release + local.get $10 + ) + (func $~lib/array/Array<~lib/string/String>#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 $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $1 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $1 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $8 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $9 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $10 + local.get $10 + local.get $9 + i32.sub + local.tee $6 + local.get $5 + local.get $8 + i32.sub + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + local.set $11 + i32.const 1 + drop + local.get $9 + local.get $8 + i32.lt_s + if (result i32) + local.get $8 + local.get $9 + local.get $11 + i32.add + i32.lt_s + else + i32.const 0 + end + if + local.get $9 + local.get $11 + i32.const 1 + i32.sub + i32.add + local.set $9 + local.get $8 + local.get $11 + i32.const 1 + i32.sub + i32.add + local.set $8 + loop $while-continue|0 + local.get $11 + local.set $6 + local.get $6 + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $7 + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $12 + local.get $12 + local.get $7 + i32.ne + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $12 + call $~lib/rt/pure/__retain + i32.store + local.get $7 + call $~lib/rt/pure/__release + end + local.get $9 + i32.const 1 + i32.sub + local.set $9 + local.get $8 + i32.const 1 + i32.sub + local.set $8 + local.get $11 + i32.const 1 + i32.sub + local.set $11 + br $while-continue|0 + end + end + else + loop $while-continue|1 + local.get $11 + local.set $6 + local.get $6 + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $13 + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $14 + local.get $14 + local.get $13 + i32.ne + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $14 + call $~lib/rt/pure/__retain + i32.store + local.get $13 + call $~lib/rt/pure/__release + end + local.get $9 + i32.const 1 + i32.add + local.set $9 + local.get $8 + i32.const 1 + i32.add + local.set $8 + local.get $11 + i32.const 1 + i32.sub + local.set $11 + br $while-continue|1 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#pop (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 300 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + local.set $2 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 + ) + (func $~lib/array/Array<~lib/string/String>#forEach (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/array/Array<~lib/string/String>#filter (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 0 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $3 + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 + local.get $3 + local.get $4 + local.tee $5 + local.get $0 + i32.load offset=12 + local.tee $6 + local.get $5 + local.get $6 + i32.lt_s + select + i32.lt_s + local.set $5 + local.get $5 + if + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + local.get $3 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $2 + local.get $6 + call $~lib/array/Array<~lib/string/String>#push + drop + end + local.get $6 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array<~lib/string/String>#shift (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 80 + i32.const 361 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + i32.load + call $~lib/rt/pure/__retain + local.set $3 + local.get $1 + i32.const 1 + i32.sub + local.set $4 + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + i32.const 1 + drop + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $4 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array<~lib/string/String>#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.lt_s + local.set $4 + local.get $4 + if + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + i32.const 3 + global.set $~argumentsLength + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + if + i32.const 1 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array<~lib/string/String>#unshift (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.set $2 + local.get $0 + local.get $2 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.set $3 + local.get $3 + i32.const 4 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + i32.const 1 + drop + local.get $3 + local.get $1 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + ) + (func $~lib/array/Array<~lib/string/String>#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $2 + local.get $2 + local.get $1 + i32.sub + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $3 + local.get $3 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $8 + i32.const 1 + drop + i32.const 0 + local.set $4 + local.get $3 + i32.const 2 + i32.shl + local.set $5 + loop $while-continue|0 + local.get $4 + local.get $5 + i32.lt_u + local.set $9 + local.get $9 + if + local.get $8 + local.get $4 + i32.add + i32.load + local.set $10 + local.get $7 + local.get $4 + i32.add + local.get $10 + call $~lib/rt/pure/__retain + i32.store + local.get $4 + i32.const 4 + i32.add + local.set $4 + br $while-continue|0 + end + end + local.get $6 + ) + (func $~lib/array/Array<~lib/string/String>#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $1 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + local.tee $4 + local.get $3 + local.get $1 + i32.sub + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $2 + local.get $2 + i32.const 2 + i32.const 16 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $9 + local.get $7 + local.get $9 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $2 + i32.add + local.set $10 + local.get $3 + local.get $10 + i32.ne + if + local.get $9 + local.get $8 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $10 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $6 + ) + (func $~lib/array/Array<~lib/string/String>#reverse (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + local.get $3 + i32.load + i32.store + local.get $3 + local.get $5 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.set $3 + local.get $5 + call $~lib/rt/pure/__release + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array<~lib/string/String>#join (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + drop + i32.const 0 + i32.const 1 + i32.lt_s + drop + i32.const 1 + drop + local.get $2 + local.get $3 + local.get $1 + call $~lib/util/string/joinStringArray + local.set $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + return + ) + (func $~lib/array/Array<~lib/string/String>#flat (param $0 i32) (result i32) + i32.const 0 + i32.eqz + drop + i32.const 10480 + i32.const 80 + i32.const 504 + i32.const 7 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array<~lib/string/String>#toString (param $0 i32) (result i32) + local.get $0 + i32.const 5296 + call $~lib/array/Array<~lib/string/String>#join + ) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~start + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end + call $start:std/array + ) + (func $~lib/rt/pure/finalize (param $0 i32) + i32.const 0 + drop + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/pure/decrement (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.and + local.set $2 + i32.const 1 + drop + local.get $0 + call $~lib/rt/rtrace/ondecrement + i32.const 1 + drop + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 122 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 16 + i32.add + i32.const 1 + call $~lib/rt/__visit_members + i32.const 1 + drop + i32.const 1 + drop + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 126 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/finalize + else + i32.const 1 + drop + local.get $2 + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 136 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + drop + local.get $0 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.const 1 + i32.sub + i32.or + i32.store offset=4 + end + ) + (func $~lib/rt/pure/__collect + i32.const 1 + drop + return + ) + (func $~lib/rt/pure/__visit (param $0 i32) (param $1 i32) + local.get $0 + global.get $~lib/heap/__heap_base + i32.lt_u + if + return + end + i32.const 1 + drop + i32.const 1 + drop + local.get $1 + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 69 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/string/String | null>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array#__visit_impl (param $0 i32) (param $1 i32) + i32.const 0 + drop + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/array/Array>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#__visit_impl (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1 + drop + local.get $0 + i32.load offset=4 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_u + local.set $4 + local.get $4 + if + local.get $2 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $while-continue|0 + end + end + local.get $0 + i32.load + local.get $1 + call $~lib/rt/pure/__visit + ) + (func $~lib/rt/__visit_members (param $0 i32) (param $1 i32) + (local $2 i32) + block $switch$1$default + block $switch$1$case$27 + block $switch$1$case$26 + block $switch$1$case$25 + block $switch$1$case$24 + block $switch$1$case$23 + block $switch$1$case$22 + block $switch$1$case$21 + block $switch$1$case$20 + block $switch$1$case$19 + block $switch$1$case$18 + block $switch$1$case$17 + block $switch$1$case$16 + block $switch$1$case$14 + block $switch$1$case$13 + block $switch$1$case$12 + block $switch$1$case$11 + block $switch$1$case$10 + block $switch$1$case$9 + block $switch$1$case$8 + block $switch$1$case$5 + block $switch$1$case$4 + block $switch$1$case$2 + local.get $0 + i32.const 8 + i32.sub + i32.load + br_table $switch$1$case$2 $switch$1$case$2 $switch$1$case$4 $switch$1$case$5 $switch$1$case$2 $switch$1$case$4 $switch$1$case$8 $switch$1$case$9 $switch$1$case$10 $switch$1$case$11 $switch$1$case$12 $switch$1$case$13 $switch$1$case$14 $switch$1$case$2 $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $switch$1$case$19 $switch$1$case$20 $switch$1$case$21 $switch$1$case$22 $switch$1$case$23 $switch$1$case$24 $switch$1$case$25 $switch$1$case$26 $switch$1$case$27 $switch$1$case$9 $switch$1$case$8 $switch$1$case$18 $switch$1$default + end + return + end + local.get $0 + i32.load + local.tee $2 + if + local.get $2 + local.get $1 + call $~lib/rt/pure/__visit + end + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String | null>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit_impl + return + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#__visit_impl + return + end + unreachable + ) + (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + ) + (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#fill + ) + (func $~lib/array/Array#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#includes + ) + (func $~lib/array/Array#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + ) + (func $~lib/array/Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#lastIndexOf + ) + (func $~lib/array/Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#copyWithin + ) + (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#slice + ) + (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#splice + ) + (func $~lib/array/Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 5296 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#join + ) + (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#constructor + ) + (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#fill + ) + (func $~lib/array/Array#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#includes + ) + (func $~lib/array/Array#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + ) + (func $~lib/array/Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=12 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#lastIndexOf + ) + (func $~lib/array/Array#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array#copyWithin + ) + (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#slice + ) + (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#splice + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + local.get $1 + i32.const 255 + i32.and + i32.gt_u + local.get $0 + i32.const 255 + i32.and + local.get $1 + i32.const 255 + i32.and + i32.lt_u + i32.sub + ) + (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) + i32.const 1 + drop + i32.const 0 + if (result i32) + i32.const 1 + i32.const 4 + i32.le_u + else + i32.const 0 + end + drop + i32.const 57 + br $~lib/util/sort/COMPARATOR|inlined.0 + end + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#sort + ) + (func $~lib/array/Array#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 5296 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array#join + ) + (func $~lib/array/Array<~lib/string/String>#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#constructor + ) + (func $~lib/array/Array<~lib/string/String>#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__visit_impl - return + unreachable end - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit_impl - return + i32.const 0 + local.set $2 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array<~lib/string/String>#fill + ) + (func $~lib/array/Array<~lib/string/String>#includes@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#includes + ) + (func $~lib/array/Array<~lib/string/String>#indexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result 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 0 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#indexOf + ) + (func $~lib/array/Array<~lib/string/String>#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable end local.get $0 + i32.load offset=12 + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#lastIndexOf + ) + (func $~lib/array/Array<~lib/string/String>#copyWithin@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 2 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array<~lib/string/String>#copyWithin + ) + (func $~lib/array/Array<~lib/string/String>#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#slice + ) + (func $~lib/array/Array<~lib/string/String>#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + global.get $~lib/builtins/i32.MAX_VALUE + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/string/String>#splice + ) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|1 (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else local.get $1 - call $~lib/array/Array<~lib/array/Array<~lib/string/String | null>>#__visit_impl + i32.const 0 + i32.eq + end + if + i32.const 0 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 return end - unreachable + local.get $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 + local.get $3 + i32.eqz + if (result i32) + local.get $4 + i32.eqz + else + i32.const 0 + end + if + i32.const 0 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $3 + i32.eqz + if + i32.const -1 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $4 + i32.eqz + if + i32.const 1 + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $3 + local.tee $2 + local.get $4 + local.tee $5 + local.get $2 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + ) + (func $~lib/array/Array<~lib/string/String>#sort@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + block $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.1 (result i32) + i32.const 0 + drop + i32.const 0 + drop + i32.const 1 + drop + i32.const 58 + br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.1 + end + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#sort + ) + (func $~lib/array/Array<~lib/string/String>#join@varargs (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 5296 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#join + ) + (func $~setArgumentsLength (param $0 i32) + local.get $0 + global.set $~argumentsLength ) )